2 Replies Latest reply on Jul 19, 2007 3:37 PM by Itay Be'erli

    Java Web Start and JNLP

    Itay Be'erli Newbie

      I'm new to JBoss and to Java Web Start.

      1. Can JBoss handle JNLP files?

      2. The Sun Web Start tutorial says (http://java.sun.com/docs/books/tutorial/deployment/webstart/deploying.html):

      Configure the Web server so that files with the .jnlp extension are set to the application/x-java-jnlp-file MIME type. How you set the JNLP MIME type depends on the Web server you are using. For example, for the Apache Web server, you simply add the line
      application/x-java-jnlp-file JNLP

      to the mime.types file.

      What's the JBoss equivalent of Apache's mime.types file?

        • 1. Re: Java Web Start and JNLP
          Itay Be'erli Newbie

          OK, i think i've solved my questions. I've been able to run a Java Web Start application from a Tomcat server (version 6.0.13). So...

          1. Yes, JBoss can handle JNLP files, since it includes a Tomcat server.

          2. The .jnlp extension is set by default to the application/x-java-jnlp-file MIME type in Tomcat (the binding is specified in conf/web.xml).

          • 2. Re: Java Web Start and JNLP
            Itay Be'erli Newbie

            I managed to deploy a simple Java Web Start application in JBoss. Here's how i did it. (Note: i use JBoss 4.0.5 and JDK1.6.0_02).

            1. I created the folder "myWebStartTest.war" under the "/server/default/deploy/" folder.
            2. I copied to myWebStartTest.war two files:
            * the example JNLP file listed in the Java Web Start tutorial at http://java.sun.com/docs/books/tutorial/deployment/webstart/deploying.html
            * the "Notepad.jar" file from the \demo\plugin\jfc\Notepad directory within the JDK installation directory.
            3. Inside the Notepad.jnlp file i changed the value of the "codebase" attribute of the root element to "http://XXX:8080/myWebStartTest/", where XXX is my server's IP address.
            4. I created a "index.html" file containing a link to "Notepad.jndl" (i didn't specify any path, simply "Notepad.jndl").

            And that was it. All that was left to do was to run JBoss (actually, JBoss could have been running all along) and point my browser at http://XXX:8080/myWebStartTest/ .

            Hip hip hurray to me!