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 XXE on the server. Example: `/opt/xxe/` on a server called `rapido`.

2. Install a Java™ 1.4.1+ JDK on `rapido` (a JRE is not sufficient).

   ### 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`.

3. Customize the XXE distribution, if needed to. Example:

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

   - Copy (XSL-FO processor plug-in) `xfc_foprocessor.jar` and `xfc.jar` to `/opt/xxe/addon/custom/`.

   - Recursively copy directory `my_configs/` containing `my_dtd1.xxe` and `my_dtd2.xxe` and all associated resources (DTD, CSS, etc) to `/opt/xxe/addon/custom/`.

   - Directory `my_configs/` also contains `my_catalog.xml`, the following XML catalog file:

         <?xml version="1.0" ?>
         <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
                  prefer="public">
           <public publicId="-//My Company//DTD DTD1 V1.0//EN"
                   uri="dtd1.dtd"/>

           <public publicId="-//My Company//DTD DTD2 V1.0//EN"
                   uri="dtd2.dtd"/>
         </catalog>

     This file has been copied to `/opt/xxe/addon/custom/my_configs/` along with all the other files.

   - Add supplemental dictionaries to `/opt/xxe/addon/custom/`.

   This customization of XXE distribution can be done by hand as shown in the above example, or 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.

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

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

   - `-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 power user who has 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` `deploywebstart` options to specify who is signing the jars.

6. 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/>
            AllowOverride None
            Order Deny,Allow
            Deny from All
            Allow from my_company.com

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

   3. Restart apache:

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

7. Tell all your future XXE users to download and install Java™ Runtime 1.4.1+ 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.

8. 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