Results 1 to 3 of 3

Thread: How to deploy Java Web Start Applications on JBoss

  1. #1
    Join Date
    Nov 2008
    Posts
    996

    How to deploy Java Web Start Applications on JBoss

    Java Web Start is knowledge for deploying and updating desktop Java function effortlessly from a web server. In this tutorial I will demonstrate the necessary steps to install a Java Web Start application on JBoss.

    Step1: Create an empty Web Project

    JWS applications need to be deployed as web applications. Create an empty application named "sampleWS".

    Step2: Create aa JNLP file which describes the Java Web Start application:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+"
          codebase="http://localhost:8080/sampleWS/" 
          href="/sample.jnlp">
       <information>
          <title>Sample JWS application</title>
          <vendor>JBoss tutorials</vendor>
          <description>JWS on JBoss Demo</description>
          <homepage href="http://java.sun.com/docs/books/tutorial/deployment/webstart/running.html"/>
          <description kind="short">Example JWS application</description>
          <offline-allowed/>
       </information>
       <resources>     
       	<jar href="/myclasses.jar"/>   
    	<j2se version="1.3+"
    	      href="http://java.sun.com/products/autodl/j2se"/>
       </resources>
       <application-desc main-class="com.sample.MainClass"/>
    </jnlp>

  2. #2
    Join Date
    Nov 2008
    Posts
    996

    Re: How to deploy Java Web Start Applications on JBoss

    Step 3: Copy the application classes into the root of the Web application

    As stated in the configuration file, the application classes will be searched in the root of the web application. So pack the application classes in a jar and place it on the root of the Web app.

    Step 4: Copy Java Web Start libraries in the "lib" folder of the Web application

    Java Web Start needs some utility libraries which are part of the J2SE. (You can find them in the folder JAVA_HOME\sample\jnlp\servlet). They are namely three files which must be placed in the "lib" folder of your web application:
    • jardiff.jar
    • jnlp-servlet.jar
    • jnlp.jar

    Step 5: Add a web.xml file to your Web Application

    You need a valid web.xml in your application which contains the mime-mappings required by Java Web Start application. The file needs to be placed in the WEB-INF folder of your web application.
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
      
    <web-app>
    <mime-mapping>
        <extension>jnlp</extension>
        <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/x-java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jardiff</extension>
        <mime-type>application/x-java-archive-diff</mime-type>
    </mime-mapping>
    
    </web-app>

  3. #3
    Join Date
    Nov 2008
    Posts
    996

    Re: How to deploy Java Web Start Applications on JBoss

    Step 6: Add an index.html file

    This file will be in charge to launch the Java Web Start application, by using the mime mappings configured:
    HTML Code:
    <html>
    <head><title>Demo Test of Java Web Start</title></head>
     <body>
    <center><a href="/sample.jnlp">Launch JWS</a></center>
     </ Body>
    That's all. The tree resumes Following the structure of the Web application:


Similar Threads

  1. Java applications on maemo
    By kALAMATHI in forum Software Development
    Replies: 4
    Last Post: 15-01-2011, 08:32 AM
  2. Can't Run Java Applications
    By mayank240 in forum Portable Devices
    Replies: 1
    Last Post: 25-10-2010, 09:55 AM
  3. JBoss jmx-console and web-console for JBoss 4.0
    By Quattro in forum Networking & Security
    Replies: 4
    Last Post: 10-03-2010, 06:19 PM
  4. What is SOAP Monitor from jboss?
    By teenQ in forum Technology & Internet
    Replies: 1
    Last Post: 30-07-2009, 07:11 PM
  5. Eclipse for your Java applications
    By JamesMK in forum Guides & Tutorials
    Replies: 3
    Last Post: 22-06-2009, 03:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,645,171.39684 seconds with 17 queries