Currently I have an app that is run via JNLP using Java web start. The user is able to hit a specific URL and launch this application just fine.
I'm able to add properties to the JNLP file itself inside of the build.xml (ant web start), by using j2seproperty tags, such as this.
<jw:j2se>
<j2seproperty name="testProperty" value="1"/>
</jw:j2se>
And these properties can be accessed anywhere in code via:
System.getProperty("testProperty");
The problem is that I want to be able to set these properties via html, such as the following.
'http://localhost:8080/somelink?testProperty=2'
What are my options for achieving this? I've done some research and so far it seems that the only solution is to somehow dynamically create the JNLP launcher via a servlet of some sort.
Is this correct, and if not, are there other options here? If so, I'm open to all possibilities...
Create the JNLP via a JSP page and have it fill in the property value from the request parameter. See this question for a slightly non-working example, but you should be able to fix it easily enough, I did.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With