You are here: Forums Ask a Rails expert Using a java applet...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 0
Sign in to rate this post
|
I have a simple rails application. In a web page I want to use a Java applet. To do so, I put the jar file of this applet on the public folder of my rails application. The code I am using to execute the applet on my page is the following one: ... However, when I execute the application I have the following error: ActionController::RoutingError (no route found to match ”/applet/TstApplet.class Am I doing something wrong or it is just not possible to execute a java applet into a web page of a rails application? Thank you Regards |
Authority 62
Posting Rating 73
Sign in to rate this post
|
Paulo, you will need to setup a route in ./config/routes.rb that looks something like this: map.connect ’/applet’ |
Authority 0
Posting Rating 0
Sign in to rate this post
|
thanks! |
Authority 12
Posting Rating 96
Sign in to rate this post
|
I don’t think anything is needed in routes.rb if the files physically exist in the public folder. I think the problem in this case is that the applet files were installed in the wrong place. If you are trying to load an applet called applet.TstApplet, you need to have the following file: RAILS_ROOT/public/applet/TstApplet.class i.e. the java package hierarchy gets turned into a directory hierarchy. |
Authority 37
Posting Rating 100
Sign in to rate this post
|
I’d have to agree with Jon on that one – defining routes is only need when you’re communicating with Rails, not when you’re just talking to assets such as images or – in your case – applet data because the public folder is set as Apache’s (or whatever http server you’re using) document root. |
Ask a Rails expert : Get disk info
Ask a Rails expert : Problem with rails 2.1.0 & its older versions
Ask a Rails expert : How to test authentication and get the specific error using net:: http class
Ask a Rails expert : AJAX and set focus
Ask a Rails expert : How to use mephisto
Ask a Rails expert : Sanitizing html
Ask a Rails expert : First post, requesting sage perspective
Ask a Rails expert : How to use mephisto
Ask a Rails expert : will_paginate customization problem
Ask a Rails expert : BackgroundRB still wants 'development' environment...?