Tomcat Setup

Running Tomcat

Once you have completed Tomcat setup, you can run Tomcat using the following shell command:
> ~dbi/tomcat/bin/catalina run

tomcat-run

Alternatively, you can use the background version (this option is not recommended since startup output is written to the log instead of stdout...)
> ~dbi/tomcat/bin/catalina start

The default port Tomcat will use is 8090. To choose a default port, edit the file $CATALINA_BASE/conf/server.xml. The port number is the attribute port of the element Connector under Server->Service in the configuration file (server.xml). Click here to view the default configuration file you have after setting up Tomcat.

To check that Tomcat is up, you can use your web browser to get its default page. The base URL of Tomcat is http://computer-name:port where computer-name is the name of the computer running Tomcat, and port is the port you have chosen. If your browser and server run on the same computer, then use the computer name localhost. For example: http://localhost:8090. You should see the following page:

tomcat-base

To stop Tomcat when it runs on the foreground, press ctrl+c. If it runs on the background, use the following shell command:
> ~dbi/tomcat/bin/catalina stop

Tomcat Running

Important Notes: