0

I have a storage box admin page that's supposed to open with Java Web Start. However, on all browsers on my MacBook, this doesn't happen and instead I just get a html page saved with contents: "v6.3.1a Web Tools 10.1.18.222 ".

Looking at the javascript code of the page, I see it is trying to detect if correct Java Web Start is installed:

function webstartVersionCheck(versionString) {
        // Mozilla may not recognize new plugins without this refresh
    navigator.plugins.refresh(true);
    // First, determine if Web Start is available
    if **(navigator.mimeTypes['application/x-java-jnlp-file'])** {
        // Next, check for appropriate version family
        for (var i = 0; i < navigator.mimeTypes.length; ++i) {
                pluginType = navigator.mimeTypes[i].type;
            if (pluginType == "application/x-java-applet;version=" + versionString) {
                return true;
            }
        }
    }
    return false;
}

Which is called here:

function writeMozillaData(page) {
        versionCheck = webstartVersionCheck("1.5");
    if (!versionCheck) {
        var pluginPage = "http://jdl.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=java.com";
        document.write("The version of Java plugin needed to run the application is not installed. The page from where the plugin can be downloaded will be opened in a new window. If not, please click here: <a href=" + pluginPage + ">Download correct Java version.</a>");
        window.open(pluginPage, "needdownload");
    } else {
        window.location = page;
    }
}

I put in an alert in the mimeTypes and notice that there is no mimeType of 'application/x-java-jnlp-file' which shows up in navigator.

Questions:

  1. Is this what is causing the browser to interpret the content as just text/html and save the html?
  2. How can I force the launch of Java Web Start here?

I do have firefox settings indicating that jnlp get handled by Java Web Start application, hence I suspect the browser is not interpreting the page as jnlp at all to begin with.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
helpmelearn
  • 381
  • 1
  • 6
  • 16

1 Answers1

1

..there is no mimeType of application/x-java-jnlp-file which shows up in navigator.

Is this what is causing the browser to interpret the content as just text/html and save the html?

Almost certainly yes. Fix the content-type.

Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433