Running and Deploying Enhydra Applications


Table of Contents

1. Other documents:
2. Running Multiserver
3. Moving an Application Between Servers

Chapter 1. Other documents:

Chapter 2. Running Multiserver

Enhydra Multiserver is a servlet runner, with a graphical administration application built in. It can serve multiple servlets (Enhydra applications) from multiple ports or other input methods (thus the multi in multiserver). You can also run your Enhydra application in any servlet-enabled web server. To start Multiserver, enter this command:

 <enhydra_root>/bin/multiserver [config-file] 

The optional parameter config-file specifies the configuration file to use. If you do not specify a configuration file, Multiserver will use <enhydra_root>/multiserver.conf. This file is a sample configuration with descriptive comments. Once the Multiserver is running, you can use the Multiserver Administration Console to make most changes to your application's runtime configuration. You should rarely need to edit this file by hand.

Note: Only one instance of the Multiserver may open a given port at a time (for use by the HTTP connection method). If you want to run multiple instances of Multiserver, for example for multiple developers, each user's configuration file will need its own set of ports.

Chapter 3. Moving an Application Between Servers

If you want to deploy your application to a server other than the one on which you developed it, go to the top-level directory in your application and enter the command ant. This will ensure the application is up to date and will rebuild the jar file

 output/lib/<appName>.jar  

An Enhydra application is a servlet, so the server will need to support servlets. Add a servlet to your server (see the documentation for your server for instructions on how to do this). You will need to supply the following:

  • Add to your CLASSPATH: <appName>.jar , core.jar, tomcat.jar, xerces.jar, xalan.jar, gnuregexp.jar, jtidy.jar, xmlc.jar and enhydra.jar (in /lib in your Enhydra installation).

  • Class name: org.enhydra.Servlet

  • Initial parameter:"confFile=/......./<name>.conf" (replace with the full path to the config file for your application, in the output directory).

How you add a servlet depends on the server you are using. See your server's documentation.