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