File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNLP Webstart- isolating application area from webserver area

 
maddy sidhan
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic