about "java web start"

E

erver

Hi,I just create a simple application for learnning JAVA WEB START.
But I meet
a problem. I am using Windows2000 + tomcat-4.1.27
I create a webapp directory called 'jwsTest' in webapps in tomcat's
directory. It just like this:
-tomcat
|-webapps
| |-jwsTest
| |-apps
| | |-lib
| | | |-jwstest.jar
| | |
| | |-images
| | |-head_new.gif
| |-jsp
| | |-index.jsp
| |
| |-WEB_INF
| | |-web.xml
| |

and I creat my jwsTest.jnlp file like this:

///////////////////// jwsTest.jnlp
//////////////////////////////////
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp
spec="1.0+"
codebase="http://192.168.3.70:8080/jwsTest/apps"
href="jswTest.jnlp">
<information>
<title> JWS Test </title>
<vendor>YOUR Name</vendor>
<description>JWS Test</description>
<icon href="images/head_new.gif"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.3"/>
<jar href="lib/jwstest.jar"/>
</resources>
<application-desc main-class="cn.com.dragontec.jws.test.MainFrame"/>
</jnlp>
\\\\\\\\\\\\\\\\\\\\\\\\\\ jwsTest.jnlp \\\\\\\\\\\\\\\\\\\\\\
create my index.jsp like this:

////////////////////////// index.jsp ///////////////////////////
<%@page contentType="text/html;charset=gb2312"%>
<html>
<title>JWS Test</title>
<head>
<SCRIPT LANGUAGE="Javascript">
function insertLink(url, name) {
document.write("<a href=" + url + ">" + name +
"</a><br><br>");
}

insertLink("http://192.168.3.70:8080/jwsTest/apps/jwsTest.jnlp","
jwsTest ");
</SCRIPT>
</head>
<body>
</body>
</html>
\\\\\\\\\\\\\\\\\\\\\\\\\\ index.jsp \\\\\\\\\\\\\\\\\\\\\\\\\


then I startup tomcat and view this using IE but i can't start this
application using JAVA WEB START. An exception followed:
JNLPException[category:ダウンロードエラー
: Exception: java.io.IOException: HTTP response 404 : LaunchDesc: null
]
at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown
Source)
at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.downloadResources(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

As I know HTTP 404 ERROR mean that the resource I request is empty.
But I type
http://localhost:8080/jwsTest/apps/lib/jwstest.jar in IE's address Bar
I can get the jar file,and when Exception appears I can see the icon
picture "head_new.gif" in JAVA WEB START's window(that picture I
defined in my jnlp file).

So any one who can tell me why??
 
M

mromarkhan

erver said:
As I know HTTP 404 ERROR mean that the resource I request is empty.
But I type
http://localhost:8080/jwsTest/apps/lib/jwstest.jar in IE's address Bar
I can get the jar file,

[snip][snip]

Peace.

The following is a wild guess.
I guess it is because of the codebase.
If you changed it to http://localhost:8080
when your testing locally maybe it will
work.
I do not put much confidence
in my answer though.

Have a good day.
 
R

Roedy Green

<description>JWS Test</description>

Since it is complaining about "launchDesc" try adding lines along
these lines:

<description>Word for word Esperanto to/from English
translator.</description>
<description kind="short">Looks up words on local and Internet
Esperanto dictionaries.</description>
<description kind="tooltip">Tradukilo</description>

If that fails, use the JNLP at
http://mindprod.com/jgloss/javawebstart.html
as a model. That does work.

Do you have your MIME types configured correctly? for jar, JNLP etc.


See http://mindprod.com/jgloss/mime.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top