Name: boT120536 Date: 08/10/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
Bug report for the jnlp servlet
There is an error in the jnlp download servlet in the version based download
mode.
I have completed the example that is used in the document "Packaging JNLP
Applications in a Web Archive" - the version based part.
I have installed jakarta-tomcat-3.2.3 and javaws-1_0_1_01-win-int.exe.
I installed the web application with as application1 in tomcat.
When I browse to http://localhost:8080/application1/app/launch.jnlp I get HTTP
404 - File not found in internet explorer.
The jnlp servlet log jnlpdownloadservlet.log says:
JnlpDownloadServlet(3): Request: /application1/app/launch.jnlp
JnlpDownloadServlet(3): User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
JnlpDownloadServlet(4): DownloadRequest[path=/launch.jnlpisPlatformRequest=false]
JnlpDownloadServlet(4): Basic Protocol lookup
JnlpDownloadServlet(3): Error code returned for request: /application1/app/launch.jnlp
JnlpDownloadServlet(4): Response:
com.sun.javaws.servlet.DownloadResponse$NotFoundResponse
I suspect that the servlet has removed app/ from the path before looking for
the launch file.
The conclusion is that the jnlp download servlet can only deliver files from
the top level of a web application.
The servlet works fine, however, in non version based download mode, and finds
the launch file in app/.
---------- here is my example:
I have added the missing main-class to the application-desc element in the jnlp file.
----- application.jar:
/app/images/icon.gif
/app/launch.jnlp
/app/lib__V2.1.jar
/app/application.jar
/app/version.xml
/index.html
/WEB-INF/lib/crimson.jar
/WEB-INF/lib/jaxp.jar
/WEB-INF/lib/jnlp-servlet.jar
/WEB-INF/web.xml
----- /app/launch.jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="$$codebase" href="$$name">
<information>
<title>Example 2</title>
<vendor>Myself</vendor>
<description>just an example</description>
<icon href="images/icon.gif"/>
</information>
<resources>
<j2se version="1.2+"/>
<jar href="application.jar" version="1.1"/>
<jar href="lib.jar" version="2.1"/>
</resources>
<application-desc main-class="Application"/>
</jnlp>
----- /index.html:
<html>
<body>
<p>Download the <a href="app/launch.jnlp"> application</a>.</p>
</body>
</html>
----- /WEB-INF/web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<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>
<init-param>
<param-name>logPath</param-name>
<param-value>../logs/jnlpdownloadservlet.log</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>
</web-app>
(Review ID: 129705)
======================================================================