Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

about "java web start"

2 views
Skip to first unread message

erver

unread,
Jun 10, 2004, 4:05:45 AM6/10/04
to
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:&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12456;&#12521;&#12540;
: 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??

mroma...@rogers.com

unread,
Jun 15, 2004, 1:52:41 PM6/15/04
to
erver wrote:

> codebase="http://192.168.3.70:8080/jwsTest/apps"

> 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.

Roedy Green

unread,
Jun 15, 2004, 3:43:09 PM6/15/04
to
On 10 Jun 2004 01:05:45 -0700, che...@dragontec.com.cn (erver) wrote
or quoted :

> <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

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

0 new messages