Win a copy of Head First Android this week in the Android forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

web start question

 
Greenhorn
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.
Thanks
 
Bartender
Posts: 11445
19
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic