16.07.2013 Views

jsr-56 - Java Community Process Program

jsr-56 - Java Community Process Program

jsr-56 - Java Community Process Program

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

An unmodified Web server can be used with the basic protocol and can often be used to download<br />

extensions that do not have a version-id 15 . It will never return the 10 Could not locate resource error code,<br />

and always instead return the 404 HTTP status code.<br />

6.2 BASIC DOWNLOAD PROTOCOL<br />

JAR and image resources without version information (i.e., the version attribute is not specified), and<br />

JNLP files are downloaded with an HTTP GET request to the Web server. For example, given the<br />

following jar element:<br />

<br />

then the JNLP Client must issue the following HTTP GET request:<br />

http://www.mysite.com/c.jar<br />

to retrieve the JAR file.<br />

The JNLP Client must examine the HTTP response status code and MIME type to determine if the result<br />

was successful. The valid responses are described in Section 6.1.2<br />

6.3 VERSION-BASED DOWNLOAD PROTOCOL<br />

The basis of the version-based download protocol is that all resources are uniquely identified by a<br />

URL/version-id pair. Thus, a JNLP Client can at any given time request a specific version of a resource<br />

located at a specific URL.<br />

The JNLP Client issues an HTTP GET request that includes the specific version of the resource that it<br />

needs. The request includes the field version-id, which specifies the requested version. For example,<br />

given the following jar element:<br />

<br />

then the JNLP Client must issue the following HTTP GET request 16 :<br />

http://www.mysite.com/c.jar?version-id=2.3%2B<br />

The JNLP Client must examine the HTTP response status code and MIME type to determine if the result<br />

was successful. The valid responses are described in Section 6.1.2. For the above jar element, the<br />

application/x-java-archive-diff MIME type cannot be returned. It can only be returned for incremental<br />

requests.<br />

The version string used in the request is not necessarily exact, e.g., 2.3+. The Web server must specify the<br />

exact version-id of the resource that is returned in the response by setting the HTTP header field: xjava-jnlp-version-id.<br />

The exact version returned must be one that matches the requested version<br />

string.<br />

15 This works since most Web servers will simply ignore the extra arguments and just return the file that the URL is pointing to.<br />

16 The plus sign (+) in the version string is converted into the %2B given the standard encoding for arguments in URLs<br />

JSR-<strong>56</strong> - Proposed Final Draft 40 of 74

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!