Bear with me, this is my first time working with web start files.
I need to pass parameters dynamically to my web start app. To do this, I searched these forums and found a solution similiar to this:
<?php
header('Content-type: application/x-java-jnlp-file');
//header('Content-Disposition: attachment; filename="myws.jnlp"');
?>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:/D:/MyWS">
<information>
<title>MyWS</title>
<vendor>jjanisch</vendor>
<description>MyWS</description>
<description kind="short">MyWS</description>
<homepage href=""/>
<icon href="logo.png" kind="default"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<jar href="MyWS.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="myws.WSFrame">
<?php
if (isset($_GET['blah']))
{
echo '<argument>'.$_GET['blah'].'</argument>';
}
?>
</application-desc>
</jnlp>
* IE7 (on my machine) starts Java Web Start perfectly fine.
* Firefox prompts me with: "You have chosen to open myws.php which is a: JNLP File. What should Firefox do with this file?" The default "Open with" is Java(TM) Web Start Launcher. If you click "OK" it starts web start perfectly fine.
I don't really want it display the ".php" extension to users so I added the following line (commented out in the above code) to the top of the myws.php file:
header('Content-Disposition: attachment; filename="myws.jnlp"');
After doing this, it now says "You have chosen to open mysw.jnlp" and everything works great in Firefox. However, now it no longer opens automatically in IE.
1) Why does adding this line prevent IE from opening the file automatically? What should I do?
2) Is my method of generating the JNLP file correct? I basically searched around the net and this seemed like the easiest solution.
3) What's the HREF tag for (in the jnlp root tag)? I removed it simply because I was automatically generating the file so I wasn't sure what to put there.
Thanks