Tomcat

1. Tomcat

Tomcat is an Open Source web server.

Tomcat is a Servlet/JSP Container.

2. Directory Listing

To turn it off, edit conf/web.xml in the tomcat directory


<init-param>
  <param-name>listings</param-name>
  <param-value>false</param-value>
</init-param>
    
By default the setting is 'true'

3. Attribute value is quoted with " which must be escaped when used within the value

You can escape your attributes with ' or maybe \"

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

4. Major Versions

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.

5. Shutdown

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

<Server port="18305" shutdown="SHUTDOWN">

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

echo SHUTDOWN | nc localhost 18305

6. Links