3.2. Deploying XXE using Java™ Web Start, a step by step description
Prev | 3. Deploying XXE using Java™ Web Start | Next

### 3.2. Deploying XXE using Java™ Web Start, a step by step description

1. Install a Java™ 1.6+ JDK (a JRE is not sufficient) on the deployment server. Example: let's call this server `rapido`.

   ### Important

   Make sure that the ``$JAVA_HOME`/bin/` directory is referenced in `$PATH` because `deploywebstart` needs to run command line tools such as `keytool` and `jarsigner`.

2. Install XXE on the server. Example: `/opt/xxe/`.

3. Customize XXE if needed to. Example:

   - Create directory `/opt/xxe/addon/custom/`. This directory will contain all the add-ons you want to deploy.

   - Unzip one or more add-on distributions in `/opt/xxe/addon/custom/`.

     You'll find the add-on distributions packaged by XMLmind in http://www.xmlmind.com/xmleditor/addons.shtml.

     ### Tip

     This customization of the XXE distribution can be done by hand by unpacking add-on distributions anywhere inside `/opt/xxe/addon/`, or more simply by using the integrated add-on manager (Options → Install Add-ons).

     In the latter case, just make sure to check "Install add-ons in XXE installation directory" in the Preferences dialog box (Options → Preferences, Install add-ons section) before using the add-on manager.

4. Test your customized distribution by running `/opt/xxe/bin/xxe` on the server.

   ### Note

   If you use the RenderX XEP plug-in, make sure that you have finished its installation by converting at least a document to PDF or PostScript®.

5. Run the `deploywebstart` command-line tool:

       /opt/xxe/bin$ ./deploywebstart -index

   - The above command generates in `/opt/xxe/webstart/` a `xxe.jnlp` file describing the deployment of XXE using Java™ Web Start.

   - `-index` is used to generate a simple `index.html` file in `/opt/xxe/webstart/`.

   - The default codebase `http://rapido.my_company.com/xxe` should work fine for this example. If this is not the case, you'll have to use the `-codebase` option.

   - Jars are signed using a self-signed certificate issued by the person who ran `deploywebstart`. Let's call him `john` (its login name is `john`).

     The first time a user will start XXE, Java™ Web Start will display a dialog box telling him that XMLmind XML Editor code has been signed by `john` (a coworker name known by the user) and that it is strongly not recommended to run such application.

     In our opinion, this is not a problem for applications deployed on a intranet. In this happens to be a problem, first add a true certificate (that is, purchased from VeriSign for example) using the `keytool` command line supplied by Sun in its JDK, then use all the four `-storepass`, `-keystore`, `-keypass`, `-alias` options to specify who is signing the jars.

6. Make sure that the files generated in `/opt/xxe/webstart/` may be read by everyone:

       /opt/xxe/webstart$ chmod a+rx .
       /opt/xxe/webstart$ chmod a+r *.*

7. Publish your customized distribution on your intranet using a HTTP server. Apache example:

   1. Add the following MIME type to `/etc/httpd/mime.types`:

          application/x-java-jnlp-file    jnlp

   2. Add a similar snippet to `/etc/httpd.conf`:

          <Directory /opt/xxe/webstart/>
            AllowOverride None
            Order Deny,Allow
            Deny from All
            Allow from my_company.com

            Options Indexes Includes
          </Directory>
          Alias /xxe /opt/xxe/webstart/

   3. Restart apache:

          # cd /etc/rc.d
          # ./apache restart

8. Tell all your future XXE users to download and install Java™ Runtime 1.6+ on their PCs. This will also automatically install Java™ Web Start.

   You can use this technology to deploy not only XXE, but also any other application written in the Java™ language.

9. Tell all your future XXE users to visit `http://rapido.my_company.com/xxe` (this will display the generated index.html) and to launch XXE from there, at least the first time.

Prev | Up | Next
3.1. The deploywebstart command-line tool | Home | 3.3. Comparison between deployment using Java Web Start and just centralizing the add-ons on a HTTP server