For example, a basic server can only support this kind of request from a JNLP client:
While a full JNLP server can reply to more sophisticated requests like the following:
Note that posing these kind of requests to a basic Web server will generally cause an error on
the JNLP client. This is not a problem anyway, as long as your JNLP files (that ultimately trig-
ger client requests) are written for and tested on the server you are going to use.
Deploying Resources to the Server
In this section, we will see how to prepare the server environment for enabling full support of
the JNLP protocol.
We will refer to a servlet implementation of the JNLP server as the one provided by Sun (that
is intended only for development) or the Juniper project implementation.
Practically, those interested in providing full JNLP support should install one of the servlet-
based solutions available to developers. See the Sun Web Start page for some further details.
As for servlet deployment, there are some practical notes in Chapter 5 as well.
Server-Side Resource Management
In the preceding chapters, we concentrated on the client-side of the protocol, assuming basic
support on the server. Files are treated like passive resources that are sent back to the request-
ing client, like the usual behavior of a static Web server.
In this scenario, each file is uniquely identified by its URL path. The JNLP client (or simply
client, for brevity) may request files specifying some given attributes value as well. The attrib-
utes JNLP supports are the following:
• Ve r sions . The version of the given resource. Versions are encoded with strings, as we
will see later.
• Supported OS . The operating systems that the given resource is designed to run on.
• Supported Architectures . Beyond the OS, the underlying hardware architecture also
• Locales . The job of localizing resources (that is, dividing them in groups depending on
the supported languages) can be left to the protocol, to avoid huge all-can-do JAR files
that support dozens of languages. The benefits are twofold: reduced download bandwidth
and easier management during the development lifecycle.