We have a java applet jar embedded in an html_area of our Web client. We store the applet jar in /usr/local/servoy/application_server/server/webapps/ROOT/servoy-webclient. In our html_area, we provide no "path" to the applet, but just its jar name like "archive=applet.jar".
When nice urls is OFF, the applet loads fine and is found at http://host/servoy-webclient/applet.jar
When nice urls is ON, the applet fails to load (presumed 404) and the attempted URL reported in the Java Console is http://host/servoy-webclient/applicatio ... applet.jar (literally "application" and "solution" in developer mode, and "application" and "s" from a test server--and not names of my app).
I attempted just naively creating the directory structure "servoy-webclient/application/solution" and placing the applet.jar there, but no joy.
I say "presumed 404" because the actual applet download in the Java Console reports:
- Code: Select all
network: Downloading resource: https://10.1.10.1/servoy-webclient/application/s/editor_helper-1.0-SNAPSHOT.jar
Content-Length: 4,698
Content-Encoding: null
and the final exception is:
- Code: Select all
java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file
The Content-Length of the applet is far longer than 4698 bytes, and one of the typical causes of the "Incompatible magic value" exception is the applet is not found and a 404 page is streamed to the class loader instead of a real class. We've eliminated other possibilities like having built the applet with the wrong version of the JDK, etc. Just switching between nice urls on/off is enough to not-work/work.
So, with nice urls turned on, do I need to locate resources like the applet somewhere else? Or is this a bug?
Thanks,
Guerry