1 Reply Latest reply on Nov 10, 2005 1:37 PM by Toison Guillaume

    Java Web Start Client deployed on JBoss Packaging Question

    Joanne Beausoleil Newbie


      I have a web start application all packaged up and running on JBoss. Just because it works, doesn't mean that I put it together correctly, and if I haven't I want to fix it.

      I have the web start application packaged inside a war file, which is packaged inside an ear, but is a web start application an application client or a web app? What is the proper way to package this? Should the jnlp, html, and js files be in a war file along with the main jar files and the common jar files (shared resources) outside the war in the ear?

      I have not been able to find any info on this. A web start applications seems to carry the characteristics of both web app and app client and both seem pretty straight forward when it comes to packaging.

      Thanks in advance for any input.

        • 1. Re: Java Web Start Client deployed on JBoss Packaging Questi
          Toison Guillaume Newbie

          If I understand correctly, our WS (Web start) app will need to interact with the server (eg sending http requests), so your web app (server side) will need some classes to.

          Basically you should split your classes into 3 jars :
          my-client.jar contains the classes only needed by the client
          my-server.jar contains the classes only the server needs
          common-resources.jar contains the classes both need

          my-client.jar and common-resources.jar must be added to your JNLP file and you must put it in the war with all your static content (images, html, js...)

          my-server.jar and common-resources must be declared in your ear descriptor (application.xml) and you should put it in the ear.

          Separating client side and server side code into distinct jars prevents clients from downloading critical classes (eg servlets) and/or configuration files which might be a vulnerability for your server. Never trust the client !