Well, isn't that interesting.

I can put the class files _on a separate server_ and access them from my .vm file like this:

<applet codebase="http://www.neko.com/applet"; code="Clock.class" width='150' height='150'>
</applet>


...and that works JUST FINE.

So I've now seen an applet running on one of my web app's pages. Whee!

But if I drag the same "applet" folder over and put it in <tomcat_home>/webapps/qguide/, and try to access it with:

<applet codebase="http://localhost:8080/qguide/applet"; code="Clock.class" width='150' height='150'>
</applet>


...then that fails with the same "bad magic number" error as I've been getting all week.

So I conclude that there's some sort of permissions/security problem that won't let me access that folder.

-- David

On Nov 21, 2003, at 3:18 PM, Dan K. wrote:


Ok, try this (assuming you're using Tomcat):


1. Copy the working STATIC html file into <tomcat_home>/webapps/qguide

2. Copy your applet class into <tomcat_home>/webapps/qguide/applet (I'm
assuming that the class does not need any third party libraries)

3. Try to get the above to work, if it doesn't then you have issues at
the tomcat level, perhaps wrong mime type or something, permissions, etc.,
which can be sorted out later. Hopefully it works..


** Assuming the above works:

4. Copy the <applet>..</applet> tag from the STATIC html file into your
screen .vm file and put the .vm file in
<tomcat_home>/webapps/qguide/templates/screens
FIX UP THE PATHS (use relative paths). Note that in this case you can
treat the Turbine "templates" directory like any other directory in your
HTML code.


5. Try and see if that works, which should, unless you got the paths
wrong.

6. Now, try to do it "dynamically" using $content.getURI('applet'), so use
similar code provided previously by "McTaggart, Peter". Put your
new screen .vm file in <tomcat_home>/webapps/qguide/templates/screens


7. Try to access the page. If it works, voila, done! If not, view the
source code for the page. It should yield the same code as your STATIC
html page. If it isn't the same, then you'll know where the problem is.


The idea here is to have Turbine generate the *exact* same html page as
your static one.

Regards,
Dan



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to