Results 1 to 5 of 5
  1. #1
    gib65 is offline Member
    Join Date
    Jun 2010
    Posts
    86
    Rep Power
    0

    Default problem with JWS: page not found

    I'm not exactly new to Java but I'm new to JWS and I don't know where else to post this (so please move it if you see fit).

    If you go to:

    Hello World GUI

    you'll see I've got a java application setup and ready to be downloaded. The problem occurs when you click on it. It says "The page cannot be found". It looks for helloworldgui.jnlp and for some reason can't find it.

    The wwwroot/JWS folder consist of the following files:

    helloworldgui.html
    helloworldgui.jnlp
    helloworldJFrame.jar
    classes\
    source\

    My jnlp file looks like this:

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://www.shahspace.com/JWS/" href="http://www.shahspace.com/JWS/helloworldgui.jnlp">
    	<information>
    		<title>Hello World GUI</title>
    		<vendor>Gibran Shah</vendor>
    	</information>
    	<resources>
    		<jar href="HelloWorldJFrame.jar"/>
    	</resources>
    	<application-desc main-class="classes.HelloWorldJFrame></application-desc>
    </jnlp>
    I know it works on my desktop as I've tested it. It's only when I upload it to my server and put it under my domain that I get this problem.

    Any suggestions will be greatly appreciated.

  2. #2
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Hello

    Try to modify your jnlp in this way...

    <jnlp spec="1.0+" codebase="." href="http://localhost:8080/... *.jnlp">

    ...
    <jar href="http://localhost:8080/... *.jar" />

    <application-desc main-class="..." documentbase="http://localhost:8080/..." name="name" />
    Some unclear read this http://java.sun.com/developer/techni...gramming/jnlp/
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

  3. #3
    gib65 is offline Member
    Join Date
    Jun 2010
    Posts
    86
    Rep Power
    0

    Default

    Okay, I changed my jnlp file so that it now looks like this:

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="." href="http://localhost:8080/helloworldgui.jnlp">
    	<information>
    		<title>Hello World GUI</title>
    		<vendor>Gibran Shah</vendor>
    	</information>
    	<resources>
    		<jar href="http://localhost:8080/HelloWorldJFrame.jar"/>
    	</resources>
    	<application-desc main-class="classes.HelloWorldJFrame" documentbase="http://localhost:8080/" name="Hello World GUI"></application-desc>
    </jnlp>
    There are still a couple problems though:

    1) in order to use localhost, I had to place it under C:\Inetpub\wwwroot, which is not my main web directory (D:\Inetpub\public_websites\...) under which exists shahspace.com plus a whole number of other domain names - so this can only work as a temporary solution until I eventually learn how to make it work under shahspace.com (this also means I can only get it to work if I'm logged onto the server - i.e. there is no way to access localhost through any internet browser remotely).

    2) Though this works if I put everything in the localhost directory (i.e. C:\Inetpub\wwwroot), I now encounter a different problem. It says:

    "Unable to load resource: http://localhost:8080/helloworldgui.jnlp"

    which actually sounds like the same kind of error except presented in a different form.

    It also gives the following stack traces:

    Java Code:
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/helloworldgui.jnlp
    	at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    	at com.sun.javaws.Launcher.launch(Unknown Source)
    	at com.sun.javaws.Main.launchApp(Unknown Source)
    	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    	at com.sun.javaws.Main$1.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    and under wrapped exception:

    Java Code:
    java.net.ConnectException: Connection refused: connect
    	at java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.net.PlainSocketImpl.doConnect(Unknown Source)
    	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    	at java.net.PlainSocketImpl.connect(Unknown Source)
    	at java.net.SocksSocketImpl.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    	at sun.net.NetworkClient.doConnect(Unknown Source)
    	at sun.net.www.http.HttpClient.openServer(Unknown Source)
    	at sun.net.www.http.HttpClient.openServer(Unknown Source)
    	at sun.net.www.http.HttpClient.<init>(Unknown Source)
    	at sun.net.www.http.HttpClient.New(Unknown Source)
    	at sun.net.www.http.HttpClient.New(Unknown Source)
    	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    	at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
    	at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
    	at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    	at com.sun.javaws.Launcher.launch(Unknown Source)
    	at com.sun.javaws.Main.launchApp(Unknown Source)
    	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    	at com.sun.javaws.Main$1.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Any further insights?

  4. #4
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Try to use this with Tomcat first because 8080 it is the Tomcat default port :)

    IIS it is not so good as for applet debugging. You have to find out the server port :(
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

  5. #5
    gib65 is offline Member
    Join Date
    Jun 2010
    Posts
    86
    Rep Power
    0

    Default

    Thanks everyone for your help.

    My application seems to be working now. Check it out if you want: Hello World GUI. Not that it's anything special - just a Hello World GUI - but it would help to be sure that others can access it without encountering errors.

    Here's the jnlp file that now works (how exactly it differs from my original attempt, I can't exactly recall):

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://www.shahspace.com/JWS/" href="helloworldgui.jnlp">
    	<information>
    		<title>Hello World GUI</title>
    		<vendor>Gibran Shah</vendor>
    	</information>
    	<resources>
    		<jar href="HelloWorldJFrame.jar"/>
    	</resources>
    	<application-desc main-class="classes.HelloWorldJFrame"></application-desc>
    </jnlp>
    PS - sorry for not posting this solution earlier - I got side tracked.

    PSS - also, what is Tomcat? Is that an alternative to IIS? Does it run on Windows Server 2003?

Similar Threads

  1. Login page problem
    By fox in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 05-04-2010, 11:30 AM
  2. Problem in JSP Page Designing
    By vinothkumarrvk in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-10-2010, 07:16 AM
  3. compilation problem "javac:file not found..."
    By Faruq in forum New To Java
    Replies: 9
    Last Post: 02-02-2010, 07:35 PM
  4. Printing only one page problem
    By AndreiDMS in forum Java 2D
    Replies: 0
    Last Post: 10-09-2009, 04:03 AM
  5. problem with calling jsp page
    By R O C K Y in forum Advanced Java
    Replies: 0
    Last Post: 04-02-2009, 10:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •