This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web start question

 
Jim Largent
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to the java web start functionality. I set up a simple application and used the sample JnlpDownloadServlet to kick it off and everything works just fine. But here's my problem, I have a web page that is generated dynamically based on user input. I want the identifying piece of information that is used to generate the web page be made available to the java application when it is kicked-off. I don't see anywhere to pass along a query string that's generated in the web page. I've searched these forums and the web in general and haven't gotten much. This usually means I'm missing something simple. I guess I could recreate the JnlpDownloadServlet so that it does what I want, but I was hoping not to write a bunch of code to do this, I mean it seems like it should be a feature. I'm using Java 1.5 with weblogic 10, any suggestions and/or comments are always welcomed and appreciated. Even if you don't have an answer, a good comment and lead to a solution.
Thanks
 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JNLP file syntax supports the "property" element which can be accessed using the System.getProperty() from your application. Check out http://download-llnw.oracle.com/javase/1.4.2/docs/guide/jws/developersguide/syntax.html#resources

One possible solution for your problem is
1) Accept all the information required from the user
2) Use a servlet to dynamically generate a JNLP file, which includes this acquired information.
3) Provide the user a link to this file.
4) Code your application to retrieve the properties from the jnlp and use them.

PS. You will have to sign the jar and ensure you have proper permissions in the JNLP for this to work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic