IGetDBWiki/GettingStarted/WebServer

From BRF-Software
Jump to navigation Jump to search

Web-Server

IGetDB should be able to run in any servlet-container, although it has been tested with Tomcat 5.5 only.

Compilation and Creation of .war File

Simply run:

ant war


This creates the igetdb.war file in share/webserver/webapps/. The target "war" has a dependency on the target "build": If any classes need to be compiled, this happens automatically.

Changing the Server-Port

To avoid clashes with other IGetDB instances running on the same machine all ports used by Tomcat are defined in the ant.properties file. When you have a fresh checkout, the file should look like this:

CATALINA_HOME /vol/bioinfo/share/apache-tomcat-5.5.15
#SERVER_PORT 8005
#HTTP_PORT 8080
#AJP_PORT 8009
#REDIRECT_PORT 8443
#SHUTDOWN_COMMAND SHUTDOWN

If you would run the command ant web.start, ant would fail with a message such as this:

web.conf.check:

BUILD FAILED
CVS/bioinfo/igetdb/build.xml:74: Please define the Tomcat ports in the ant.properties file.

All you need to do is uncomment the four properties definitions SERVER_PORT, HTTP_PORT, AJP_PORT, and REDIRECT_PORT and change the numbers to your favourite port numbers. The property SHUTDOWN_COMMAND must be uncommented as well. Changing the shutdown command is not compulsory, but advisable.

Start/Stop the Web-Server

Depending on where you want to develop you might need to change the file ant.properties. It defines the base directory of the Tomcat server, also called CATALINA_HOME. The checked in version defines CATALINA_HOME for our Solaris environment.

Important: you need to define the JAVA_HOME environment variable in your shell. It should point to the base directory of your Java installation (n.b. our rcinfo packages do not define this variable). The variable is needed by the Tomcat start script.

  • Starting the webserver: ant web.start
  • Stopping the webserver: ant web.stop