All notes
Tomca

Basics

About tomcat

WikipediaEN.

Difference with apache server

51CTO.

Servlet

Wikipedia.

Install

Tomcat's Directories

ehchua.

Environment Variables

Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can be specified in the "setenv" script. The script is placed either into CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named setenv.bat or setenv.sh. The file has to be readable.

JRE_HOME=/usr/java/latest
CATALINA_PID="$CATALINA_BASE/tomcat.pid"

Startup

URLs

FAQ

Bind to ipv4 instead of ipv6

StackOverflow. In tomcat.conf, add

JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"

Where is tomcat/webapps?

It can be changed in the /etc/tomcat/server.xml in the <Host />. See the Tomcat documentation, specifically the section in regards to the Host container. The default is "webapps" relative to the $CATALINA_BASE. An absolute pathname can be used.