generating the jnlp file on the fly
Hi all,
I have a working jnlp file with an embedded username and password arguments in the application-desc section that launches from my .shtml file (cited below). During development the username and password have been hardcoded into the .jnlp file but I want to be able to have a real user log in to the .shtml page and when they click on the .jnlp link I was hoping it could actually be a Perl/CGI script that would print the .jnlp file with the username and password slipped in. This is my first Web Start deployment and I am not sure it can be done the way I described.
Can the .jnlp link below (Launch MyApp) be changed to a .cgi link that will print the 'contents' of the .jnlp file with the real username and password substituted?
Thanks for your help.
hopi
<script language="JavaScript">
/* Note that the logic below always launches the JNLP application if
* the browser is Gecko based (Firefox). This is because it is not possible
* to detect MIME type application/x-java-jnlp-file on Gecko-based browsers.
*/
if (javawsInstalled || (navigator.userAgent.indexOf("Gecko") !=-1)){
document.write("<a href=http://mydomain.com/jawsdir/mywebstart/myapp.jnlp>Launch MyApp</a></li>");
document.write("<li><a href=http://mydomain.com/jawsdir/mywebstart/notepad.jnlp>Launch Notepad</a>");
}else{
document.write("Click ");
document.write("<a href=http://java.sun.com/PluginBrowserCheck?pass=http://mydomain.com/jawsdir/mywebstart/jredownload.shtml&fail=http://java.sun.com/javase/downloads/index.jsp>here</a> ");
document.write("to download and install JRE, then launch MyApp");
}
</script>

