Java Reference
In-Depth Information
L ISTING 12.2 An Example of the version.xml File Showing the Equivalence of the Two
Specification Mechanisms
<jnlp-versions>
<resource>
<pattern>
<name>application.jar</name>
<version-id>1.2</version-id>
<locale>en_US</locale>
<locale>it</locale>
</pattern>
<file>application__V1_2__Len_us__Lit.jar</file>
</resource>
</jnlp-versions>
Behind the Scenes of a JNLP Server
Now we will see some of the details of a JNLP server implementation. We don't have the
space needed to cover all the aspects of such an implementation. Instead, we will provide
commented code for the more particular aspects of the protocol, such as version management,
while leaving out servlet implementation details. Those interested may refer to the Juniper
home page for the source code of a complete, up-to-date, and robust JNLP server
implementation.
We will begin with HTTP details.
HTTP Implementation
The JNLP protocol builds on top of the HTTP protocol. All JNLP requests are special HTTP
GET requests.
In the following table are listed all the new MIME types that a Web server fully supporting
JNLP needs to use.
MIME type
Description
JAR file
Application/x-java-archive
JARDiff file
Application/x-java-archive-diff
JNLP file
Application/x-java-jnlp-file
Generic JNLP-related error
Application/x-java-jnlp-error
In case of a JNLP-error response type, the following error codes are used by the server.
Search WWH ::




Custom Search