catalina.properties

This configuration file was introduced in Tomcat 5.0 and is still present in Tomcat 6.0. The conf/catalina.properties file is a regular Java properties file. It sets some important class loader paths, security package lists, and some tunable performance properties. Another feature of the catalina.properties file is that you may set custom properties in this file and reference them as variables in Tomcat's server.xml file. For example, if you put this in catalina.properties:

# The HTTP port number.
http.port=8080

Then, in server.xml you can configure your connector using the http.port property by referencing it as ${http.port}:

<Connector port="${http.port}
"
           protocol="org.apache.coyote.http11.Http11Protocol"
           maxThreads="150" connectionTimeout="20000"
           redirectPort="8443"/>

This way, you may change any setting in catalina.properties that you would like to set that would otherwise require you to change server.xml.

By default, this property file has two properties that are used only when Tomcat's security manager is enabled: package.access and package.definition:

package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.a
pache.jasper.,sun.beans.
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tom
cat.,org.apache.jasper.

They're configurable lists of packages that are only accessible by webapps, when the administrator has granted permissions for them to be used by modifying the catalina.policy file. Most users don't ...

Get Tomcat: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.