Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Issue while deploying JNLP application in Webspher Application Server.

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Issue while deploying JNLP application in Webspher Application Server.

    Hi All,

    I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.


    1. Created a dynamic web project JWStartProject in eclipse
    2. Create a HelloWorld.java class under default package.
    import javax.swing.*;
    public class HelloWorld extends JFrame {
    private static final long serialVersionUID = 4968624166243565348L;
    private JLabel label = new JLabel("Hello Java Web START!");

    public HelloWorld() {
    super("Jave Web Start Example");
    this.setSize(350, 200);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
    this.setLayout(null);
    }
    public void addButtons() {
    label.setSize(200, 30);
    label.setLocation(80, 50);
    this.getContentPane().add(label);
    }
    public static void main(String[] args) {
    HelloWorld exp = new HelloWorld();
    exp.addButtons();
    exp.setVisible(true);
    }
    }


    3. Run the HelloWorld.java and tested the result.
    4. Now exported HelloWorld.jar and signed HelloWorld.jar using KeyStore
    5. Added signed HelloWorld.jar under WEB-INF folder
    6. Now I created HelloWorld.jnlp and placed under WEB-INF folder
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="https://127.92.92.1:9043/JWStartProject/"
    href="HelloWorld.jnlp">
    <information>
    <title>HelloWorld</title>
    <vendor>IBM - JWS example of HelloWorld</vendor>
    <description>HelloWorld - Example of JWS</description>
    <description kind="short">HelloWorld example</description>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.6+"/>
    <jar href="HelloWorld.jar"/>
    </resources>
    <application-desc main-class="HelloWorld"/>
    </jnlp>

    7. Now I created Index.html and placed under WEB-INF folder
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <HTML>
    <HEAD>
    <TITLE>index.html</TITLE>
    </HEAD>
    <BODY>
    <A href="HelloWorld.jnlp">Launch HelloWorld using JWS</A>
    </BODY>
    </HTML>

    8. web.xml contains following code.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>JWStartProject</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
    <init-param>
    <param-name> logLevel </param-name>
    <param-value> DEBUG </param-value>
    </init-param>
    </servlet>

    <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jnlp</url-pattern>
    </servlet-mapping>

    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>

    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    </web-app>

    9. Now I exported this project as JWStartProject.war contains following code.
    10. Created Server in Websphere Admin console
    11. Deployed this war file under the server and started.
    12. I have added MIME types also.
    I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?

    Regards
    Victor.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Issue while deploying JNLP application in Webspher Application Server.

    404 error.
    Have you looked up the meaning of that error?
    What file is not being found?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. RMI application connection issue
    By progkay7 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 21st, 2013, 05:35 AM
  2. Muliple Client Server chat application..how to send message from server..
    By jesroni in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 14th, 2013, 11:17 PM
  3. Deploying db application
    By drimades in forum Java IDEs
    Replies: 1
    Last Post: March 19th, 2012, 05:11 AM
  4. JNLP webstart application in localhost
    By Jhovarie in forum Threads
    Replies: 2
    Last Post: February 14th, 2011, 06:53 PM
  5. Java Application Server
    By goutamdaphtari in forum Java Theory & Questions
    Replies: 0
    Last Post: July 14th, 2010, 11:53 PM