I have created a Java Web Start application which works fine when launched from a web application. I made a JSP to build my JNLP file from certain parameters. A parameter "college" would define the location a user is working on (just as a convenience to narrow down in the database). The shortcuts are created just fine, everywhere. But when a user selects a different "college" the shortcut is replaced (if the first shortcut said "Palo Alto" it changes for "St. Philip's").
I want to give the user's the ability to install different "versions" (according to the "college" parameter). I want the user to have a shortcut for each "college". My question is, what makes an application unique? the jar names, the main file? I'm thinking of parameterizing those inside the jnlp to make it different for each download.
I'll try my idea and post the results, just in case someone has the same need.
Ok, I tried first to add parameters to every jar tag, but Web Start is smarter than that. Everything before the questin mark is used, the rest is ignored.
This doesn't work, it just replaces (good for when you want to replace ;-D ):
<jnlp codebase="http://example.com/web-app" href="http://example.com/web-app/Launch.jnlp?college=${params.college}" spec="1.0+">
I solved it by changing the href attribute of the jnlp tag for every version, this works creating a new shortcut:
<jnlp codebase="http://example.com/web-app" href="http://example.com/web-app/Launch${params.college}.jnlp" spec="1.0+">
Have fun/be good.