I'm sure you've tried a lot of things, but here's a couple of extra ideas for a person-in-need:
1) Are you running tomcat on port 80, or on the default 8080? Using Apache as the webserver with the connector to tomcat, or what? 2) If you hit http://myurl.com:8080/qguide/ do you get a Tomcat message? 3) Can you browse folders from the Tomcat directory listing? If you're only getting error messages (access denied and the like) from Tomcat then it's a permission error with either your web.xml or (more likely) the server.xml for Tomcat. Check the server, because if it's loading the turbine servlet and serving pages but not giving access to subdirectories in the webapp it's for sure permissions. Regards, -Greg > -----Original Message----- > From: David Ramsey [mailto:[EMAIL PROTECTED] > Sent: Sunday, 23 November 2003 11:19 a.m. > To: Turbine Users List > Subject: Re: Using Java applets in a Turbine/Velocity webapp > > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]