JNLP Webstart- isolating application area from webserver area
Joined: Mar 17, 2007
Hello fellow Ranchers!
I am running a webstart application (on tomcat webserver), and looking to isolate the 'webserver area' from 'application area', if at all it's possible.
Basically, I want to be able to launch jars from a different directory (application area) to that of webserver.
This is my tomcat area:
This is where my servlet (which hosts URL to .jnlp) and .jnlp reside:
host:/apps/tomcat-6.0.10/webapps/myapp/servlet.java host:/apps/tomcat-6.0.10/webapps/myapp/WEB-INF/classes/servlet.class host:/apps/tomcat-6.0.10/webapps/myapp/my.jnlp
This is my application area:
host:/apps/myapp/jars (has all binaries)
host:/apps/myapp/config (has all configs)
From the 'tomcat area' which has the .jnlp file I want to be able to call jars and configs from 'myapp area'.
I've tried symlinks but no success. Moving the .jnlp to 'myapp area' has other complications.
I've tried looking up on the forum, but doesn't seem like this type of issue was discussed.
It seems to me that the JNLP should be able to download its jars from anywhere on your server. JNLP doesn't know anything about web applications, it only knows about URLs. You just have to put the jars in a place where they can be accessed from the outside world. So... what have you tried so far?
Joined: Mar 17, 2007
it seems (at least in my case) jnlp can only download jars that are under webservice, i.e tomcat's webapps (host:/apps/tomcat-6.0.10/webapps/myapp/jars). When I copy jars from 'app area' to above, everything works fine. But then my codebase (in jnlp file) is set to h t t p://host:8080/myapp which means it will call local jnlp and jars from myapp/jars.
1. I have tried symlinking above "jars" directory to jars under 'app area':
host:/apps/tomcat-6.0.10/webapps/myapp/> ls -l
lrwxrwxrwx 1 xxxx xxxx 38 Nov 1 16:23 jars -> /apps/myapps/jars
...but jnlp can't find jars.
2. I've tried changing codebase to point to /apps/myapps/jars both on h t tp:// (and even file:///), but doesn't help.
Seems to me you are looking at things from the server's point of view. But the JNLP is going to run on the client, so you have to look at things from the client's point of view. Test whether a browser can download the jar, and when it can use that URL in the JNLP.