aspose file tools*
The moose likes JNLP and Web Start and the fly likes JNLP Webstart- isolating application area from webserver area Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "JNLP Webstart- isolating application area from webserver area" Watch "JNLP Webstart- isolating application area from webserver area" New topic
Author

JNLP Webstart- isolating application area from webserver area

maddy sidhan
Greenhorn

Joined: Mar 17, 2007
Posts: 10
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:
host:/apps/tomcat-6.0.10/

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'.

Any ideas?

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.

Many thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

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?
maddy sidhan
Greenhorn

Joined: Mar 17, 2007
Posts: 10
Thanks Paul.

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.

Thanks again.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNLP Webstart- isolating application area from webserver area