Problem with nice urls and html load path

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Problem with nice urls and html load path

Postby guerry » Fri May 27, 2011 7:22 pm

Hi all,

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
guerry
 
Posts: 37
Joined: Tue Nov 09, 2010 4:51 pm

Re: Problem with nice urls and html load path

Postby jcompagner » Mon May 30, 2011 10:58 am

this is a problem with nice urls..
Because then we will have a path and your archive url must point to it correctly.

so generating a absolute path is one option i can think off.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Web Development

Who is online

Users browsing this forum: No registered users and 2 guests