Skip to content

Tomcat

Tomcat is an Open Source web server, and a Servlet/JSP Container.

It is possible to run multiple tomcat instances on a single server, or on your own computer for development.

The CATALINA_HOME environment variable should point to the common installation directory.

While CATALINA_BASE should point to your instance specific configuration directory. Your instances would typically be configured with different ports.

To turn it off for the default servlet, edit the listings param in conf/web.xml in the tomcat directory.

conf/web.xml
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>

Attribute value is quoted with ” which must be escaped when used within the value

Section titled “Attribute value is quoted with ” which must be escaped when used within the value”

Escape your attributes with ' or \"

Otherwise use the JVM parameter -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

In the server.xml of your tomcat instance, there is a Server element. You can specify to shutdown the tomcat server by sending a command to a TCP port.

server.xml
<Server port="18305" shutdown="SHUTDOWN">
..
</Server>

If the above is configured, you can use for the following command to start a shutdown

Terminal window
echo SHUTDOWN | nc localhost 18305

7.0.x tomcat provides 3.0 Servlet, 2.2 JSP spec, and requires java 1.6

6.0.x tomcat provides 2.5 Servlet, 2.1 JSP spec, and requires java 1.5

5.5.x tomcat provides 2.4 Servlet, 2.0 JSP spec, and requires java 1.4. This reaches end of life 2012-09-30.

Tomcat servlet container