• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

web start question

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Posts: 11497
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic