jsr-56 - Java Community Process Program
jsr-56 - Java Community Process Program
jsr-56 - Java Community Process Program
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6 DOWNLOADING AND CACHING OF RESOURCES<br />
The JNLP Client can download four different kind of resources from the Web: JAR files, images,<br />
extensions, and JNLP files. This sections describes how they are downloaded, and how they can be cached<br />
on the client system.<br />
JNLP defines three different download protocols, all based on HTTP GET requests:<br />
A basic download protocol which does not require special Web server support. This can be used for<br />
JAR files, images, and JNLP files.<br />
A version-based download protocol that allows greater control over which resources are downloaded<br />
and which supports incremental updating of JAR files. This can be used for JAR files and images.<br />
An extension download protocol which is an addition to the above protocols to include platformspecific<br />
information. This is used for JNLP files containing extension descriptors.<br />
Resources are named uniquely in a JNLP file using the href and version attributes. The following table<br />
summarize the different elements that refer to external resources and which download protocols they<br />
support.<br />
Element href attribute version attribute Supported Protocols<br />
jnlp Optional Optional Basic<br />
icon Required Optional Basic, Version-based<br />
jar Required Optional Basic, Version-based<br />
nativelib Required Optional Basic, Version-based<br />
extension Required Optional Extension<br />
j2se Optional Required Extension<br />
6.1 HTTP FORMAT<br />
The HTTP protocol is used to transfer all information between the Web server and the JNLP Client. The<br />
following describes the common request and response format used by all download protocols.<br />
6.1.1 REQUEST<br />
Each request consists of an HTTP GET request to the URL for the given resource, and potentially a set of<br />
arguments, passed to the Web server in the query string of the URL. The syntax for a request is:<br />
request ::= URL [ "?" arguments ]<br />
arguments ::= key "=" value ( "&" key "=" value ) *<br />
The key and value elements are encoded using the default encoding for parameters passed in URLs. To<br />
convert a key/value, each character is examined in turn:<br />
The ASCII characters ’a’ through ’z’, ’A’ through ’Z’, ’0’ through ’9’, ’.’ , ’*’, ’-’, and ’_’ can remain the<br />
same.<br />
JSR-<strong>56</strong> - Proposed Final Draft 38 of 74