4.2. Testing the XXE applet, a step by step description
Prev | 4. Deploying XXE as an applet | Next

### 4.2. Testing the XXE applet, a step by step description

The procedure below is identical to the one used to deploy XXE using Java™ Web Start. The only difference is that you need to use different options for the `deploywebstart` command-line utility.

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.

     ### Caution

     Note that `deploywebstart` only scans the `addon/` subdirectory of the installation directory of XXE. It completely ignores the add-ons found in the `addon/` subdirectory of the user preferences directory.

   - 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 -applet xxe -index

   - `-applet xxe` is used to generate in `/opt/xxe/webstart/` a `xxe.jnlp` file describing the deployment of XXE as an applet rather than using Java™ Web Start.

   - `-index` is used to generate a simple `index.html` file in `/opt/xxe/webstart/`. This file contains the applet element.

   - Jars are signed using a self-signed certificate issued by the person who ran `deploywebstart`. If you want to sign the jars with an actual certificate, you need to use all the four `-storepass`, `-keystore`, `-keypass`, `-alias` options.

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 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/

   2. Restart apache:

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

8. Point your Web browser to `http://rapido.my_company.com/xxe`.

Prev | Up | Next
4.1. Requirements | Home | 4.3. Integrating the applet with your web application