Apache Tomcat
Tomcat download and install
Go to the Apache Tomcat download site and download the core distribution that matches your hosting environment. Extract the tar or zip file into the directory from which you want to run the Tomcat server. Set the environment variable CATALINA_HOME to the extracted directory.
e.g. if you untarred apache-tomcat-5.5.26.tar in /usr/local, CATALINA_HOME should be set to /usr/local/apache-tomcat-5.5.26.
Tomcat Configuration
Complete Tomcat documentation can be found at Tomcat 5-5 doc. The things you may need to do for OSCARS are itemized below.
$CATALINA_HOME/conf
- server.xml - defines standalone Tomcat server - service name is Catalina
the connector elements define the port(s) on which tomcat will listen the protocol (http or https), and the location of the keystore for https connectors.
You should enable Tomcat to run https only, as user passwords are passed to the browser interface. If http is used the passwords are passed unencrypted. See SSL-howto for instructions on how to do this.
- define a dumper valve here
- define remoteAddrValve here if you wish to limit the sites that can access the connector
- web.xml - defines default values for servlets for static resources, e.g. jsp, We used the sample in the distribution but enabled the SSI filter to enable server includes on all html files as the OSCARS documentation html pages use server-side includes.
- context.xml - Uncomment the line <Manager pathname="" /> to not allow sessions to be saved between Tomcat restarts.
- logging.properties - can be edited to change some logging levels (see logging configuration for more on how to customize Tomcat to use log4j)
- tomcat-users.xml - user names and passwords for access to the Tomcat administrative web pages
$CATALINA_HOME/common
Classes and libraries shared by the Tomcat server and all the webapps. We added common/classes/log4j.properties and common/lib/log4j.jar and commons-logging.jar in order to get Tomcat to do log4j logging. By default it just uses commons logging.
$CATALINA_HOME/shared
Contains classes and libraries shared by all the webapps but not the Tomcat server. This has been where we have put files that can't seem to be found from the axis2.war or the OSCARS.aar. The ant task setupServer will populate the classes directory and deploylibs will populate the lib directory. Currently the contents are:
- classes/repo - files that need to be on the classpath as repo/<filename> These are files used when OSCARS is forwarding a request, see OSCARS interdomain.
- OSCARS.jks
- rampConfig
- ssl-keystore.jks
- axis2.xml
- modules
rampart-SNAPSHOT.mar
- classes/server
- oscars.key
- oscars.properties
- ciscoSetupL2.xml
- ciscoTeardownL2.xml
- juniperSetupL2.xml
- juniperSetupL3.xml
- juniperStatusL2.xml
- juniperStatusL3.xml
- juniperShowRouteL3.xml
- juniperTeardownL2.xml
- juniperTeardownL3.xml
- idc-topicnamespace.xml
- idc-topicset.xml
- pss.key
- mail_templates
- test.properties
- perfSONAR-LSQuery.xml
- test.properties
lib contains the axis2 and rampart jars
on some installations it was necessary to copy dcn-software-suite-0.3/idc/lib/antlr-2.7.6.jar to either shared/lib or $CATALINA_HOME/webapps/axis2/WEB-INF. ( see faq.html )
$CATALINA_HOME/webapps
Contains all the user provided war files. In our case this is OSCARS.war and axis2.war. When a war file is put in this directory it will be automatically deployed by the Tomcat server and its contents will be extracted into a directory with the name of the war.
Every Tomcat webapp has a WEB-INF/web.xml that defines the service name and methods.
$CATALINA_HOME/bin - startup scripts
- startup.sh - we edited to set OSCARS_HOME and JAVA_OPTS="-Djava.net.preferIPv4Stack=true" to get around a FreeBSD 6.0 / ipv6/ jdk1.5 bug
- catalina.sh - starts the command with output sent to $CATALINA_HOME/logs/catalina.out




