Install XXE on the server. Example: /opt/xxe/
on a server called rapido
.
Install a Java™ 1.4.1+ JDK on rapido
(a JRE is not sufficient).
Make sure that the
directory is referenced in $JAVA_HOME
/bin/$PATH
because deploywebstart
needs to run command line tools such as keytool
and jarsigner
.
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 (Install add-ons in XXE installation directory" in the Preferences dialog box ( | , Install add-ons section) before using the add-on manager.
| ). In the latter case, just make sure to check "Test your customized distribution by running /opt/xxe/bin/xxe
on the server.
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.
Publish your customized distribution on your intranet using a HTTP server. Apache example:
Add the following MIME type to /etc/httpd/mime.types
:
application/x-java-jnlp-file jnlp
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/
Restart apache:
# cd /etc/rc.d # ./apache restart
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.
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.