SWAMP Index Design
SWAMP
* Home
* Documentation
* License
* Demo Server
* Wiki
* Screenshots
* F A Q
* Downloads
* Contact
* Credits

SWAMP is supported by:
SourceForge.net Logo
and
Novell

Setup Apache Tomcat

The easiest way (on SuSE) is just to install the tomcat5 RPM, which can be done easily with YaST. On other distributions / operating systems, please use the package management tools or download the official distribution available from http://jakarta.apache.org/tomcat which should work just as well. We are developing on Tomcat 5.0.30, for older versions, please read the issues paragraph.

Tomcat issues:

SLES9 (tomcat 5.0.19):

  • - Do a: chown -R tomcat.tomcat /srv/www/tomcat/base/webapps/webswamp/ otherwise tomcat will not be able to write files

  • - Remove: /usr/share/tomcat/common/lib/commons-collections.jar as it conflicts with the collections lib installed by SWAMP.

Setting up Tomcat:

The following instructions are only neccessary if you want to do administrative tasks on the tomcat server itself. If you don't, just skip them.

Go to $TOMCAT_BASE/conf. ($TOMCAT_HOME is /srv/www/tomcat5/base/conf for the SuSE rpm). Edit the file tomcat-users.xml and make the following changes:

<role rolename="tomcat"/>
+  <role rolename="manager"/>
+  <role rolename="admin"/>
-  <user username="tomcat" password="tomcat" roles="tomcat" />
+  <user username="tomcat" password="tomcat" 
+	roles="tomcat,admin,manager"/>
<user username="role1" password="tomcat" roles="role1"/>
This means that the user "tomcat" with password "tomcat" (please use a sensible password here!) can now access tomcats manager and admin web-application.

Starting, restarting, and stopping Tomcat


For the SuSE rpm, issue as root:
# rctomcat start
# rctomcat restart
and
#rctomcat stop

You can set additional options by setting the variable JAVA_OPTS in /etc/sysconfig/j2ee, e.g.:
JAVA_OPTS="-server -Djava.net.preferIPv4Stack=true -Xmx128M"
On a manual installation, go to $TOMCAT_HOME/bin and call startup.sh and shutdown.sh at your leasure.

Check http://localhost:8080/. You should see the Tomcat default page there.

Reloading web applications:

Go to http://localhost:8080/manager/html and log in with the user tomcat/tomcat (or whatever you set up in the step before). You see a list of web applications Tomcat has found in its webapp directory. If you rebuilt and re-installed a webapp, locate it in this list and click on the "reload" link.

To reload a webapp from the command line you can use:

curl -u <user>:<password>@http://<hostname>:8080/manager
	/html/reload?path=/webswamp

To avoid automatic re-deployment of the webapp on changes in config files, set autoDeploy="false" in the server.xml's <Host> element.


Valid CSS! Valid XHTML 1.0!