I found one non-rails but simple workaround.

I setup an apache server and put the java applet in an accessible
folder, e.g. http://localhost/public. Then in the applet tag, I
inserted the attribute codebase. e.g.

<applet codebase="http://localhost/public";
        code="org.abc.something.class"
        archive="def.jar"
        width="1200" height="480"... >
...
</applet>

phew...

However, if there is still a simple way to load an applet from within
rails I would be very interested to find out as well.

On Jul 11, 1:20 am, yitping <[EMAIL PROTECTED]> wrote:
> I have similar problems. Instead of a straightforward class file, I
> have the class file in packages, e.g.
>
> <appletcode="org.abc.something.class"
>         archive="def.jar"
>         width="1200" height="480"... >
> ...
> </applet>
>
> Although I have the def.jar file in RAILS_ROOT/public directory, rails
> complains that it can't load the class file. It says:
>
> ActionController::RoutingError (no route found to match "/<controller>/
> org/abc/something.class" with {:method=>:get}):
>
> Please help. Thanks in advance.
>
> On 3 Jun, 04:10, SurviveStyle5 <[EMAIL PROTECTED]> wrote:
>
> > Thanks, i'll give that a try
>
> > On May 31, 9:30 am, pcrawfor <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > You will either need to put them in a folder (or directly in) the
> > > public folder OR create a controller that can serve thefilesout
> > > using a send_file method might also work but in generalfilesyou want
> > > to provide go under the public folder (eg. images in public/images).
>
> > > Once a file is in public the relative path would be /file_name or if
> > > it is in a sub-folder (eg. images) /images/file_name.
>
> > > I think that covers the basics...
>
> > > Paul Crawford
>
> > > On May 30, 9:52 am, SurviveStyle5 <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
> > > > I'm pretty new to Ruby on Rails and web development in general. I have
> > > > a question and was wondering if anyone could help me out.
> > > > Right now I have some .jarfilesthat are embedded in a web page
> > > > ala...
>
> > > >         <Appletcode="something.class"
> > > >         archive="pluginLib-jre1.6.0_05.jar,some.jar,another.jar"
> > > >         width="1200" height="480" MAYSCRIPT=true >
>
> > > > ...yadda yadda yadda....
>
> > > >         </Applet>
>
> > > > These work fine in a normal html page (locally, no webserver
> > > > required). When i attempt to embed them within a rails page it cannot
> > > > seem to find the path to the .jarfiles. I exported the Dir::pwd and i
> > > > checked out Rails ENV and started copying thejarfileseverywhere but
> > > > it still never seemed to find it it... am I missing something?
> > > > Is there something special i have to do to get rails to recognize
> > > > this? what is my loadpath/where should i be putting these .jarfiles?
>
> > > > Thanks for the help

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to