-
1. Re: Loading Applets
jaikiran Jan 25, 2008 1:45 AM (in response to tnyh)Google search for this error, led me to this http://forum.java.sun.com/thread.jspa?threadID=640927. See if it's applicable in your case too. Does the java console show any other exceptions?
-
2. Re: Loading Applets
tnyh Jan 25, 2008 10:06 AM (in response to tnyh)I've come across that thread during my quest to correct the problem, but it doesn't seem to provide a concrete answer...
Just in case I'll elaborate on my problem...
The applet (which runs fine through applet viewer/browers from local drives and off the net) is packaged into the war archive file.
Upon opening the war file, the applet class file is there: cews.war/applet.class
Going to localhost/cewslite/applet.class lets me download the class file no problem.
But any applet tag that attempts to access the file gives me the error seen above.
oh and thanks for the replay jaikiran, I appreciate the help -
3. Re: Loading Applets
tnyh Jan 25, 2008 11:29 AM (in response to tnyh)Doesn't appear to be an 'edit post' option... oh well
I suppose the main problem here is when I use an applet tag (from anywhere) to access the class files
<applet code=app.class codebase="http://localhost/cews/" \>
or an html in the same dir
<applet code=app.class codebase="." />
all of them fail with the magic number problem, which I assume is because instead of a class file some sort of html/xml (404 page?) file is retrieved and the applet viewer treats this as a class file instead.
How am I to actually get to those class files when my server refuses to even try?
Oh and I moved the class/jars from the image folder up one level to the root: http://localhost/cewslite/
Argh -
4. Re: Loading Applets
tnyh Jan 25, 2008 3:24 PM (in response to tnyh):)
Managed to figure it out.
Turns out that in order to access any files within the file system in the application, you need to login. But because the applet loader retrieves the file in a different session I receive the login page.
of which the first few characters are "<!--"
now that I know whats wrong, I can make some progress!