Skip to Content
Technical Articles
Author's profile photo John Shen

How to get a quick overview on Tomcat related words

Someone might be always annoyed or confused during Tomcat configurations because of too much jargon.  So I write this blog to give you a quick overview on Tomcat related words & elements.

Tips: I collect those information from http://tomcat.apache.org/.

This article has three items, so that you can easily find what you want to know for both beginners and experts accordingly.

  • Most used tomcat directoriesOverview on Tomcat directory functions.
  • Two confusing namesTwo basic concepts of Tomcat parameters.
  • Element structure in server.xmlDetailed explanations on elements in server.xml.

Most used tomcat directories:

/bin Startup, shutdown, and other scripts.
/conf Configuration files. The most important file in here is server.xml.
/logs Log files are here by default.
/webapps This is where your webapps go.
/work Directory that contains temporary working directories for the deployed web applications.
/temp Directory used by the JVM for temporary files.


Two confusing names:

CATALINA_HOME Tomcat installation directory, for example, C:\Program Files\tomcat.
CATALINA_BASE Runtime configuration of a specific Tomcat instance. If you want to have multiple Tomcat instances on one machine, use the CATALINA_BASE property.

Note: By default, CATALINA_HOME and CATALINA_BASE point to the same directory.


Element structure in server.xml:

Server
—-Listener 
—-GlobalNamingResources
—-Service 
——–Executor
——–Connector
————Engine
—————-Host
—————-Realm

To know the details of every element, please check the explanation form below:

Server Represents the entire Catalina servlet container. A server must have a shutdown port number.
Listener Usually for Tomcat starting or Tomcat stopping.
GlobalNamingResources The global JNDI resources for the Server. Usually for tomcat-users.xml.
Service The combination of one or more Connectors that share a single Engine for processing incoming requests. One or more Service elements may be nested inside a Server element.
Executor A thread pool that can be shared between components in Tomcat, The executor is a nested element to the Service element. And in order for it to be picked up by the connectors, the Executor element has to appear prior to the Connector element in server.xml.
Connector Recieve the request using a specified protocol
Engine The entire request processing machinery associated with a particular Catalina Service. It receives and processes all requests from one or more Connectors. One Engine MUST be nested inside a Service element, following all of the corresponding Connector elements associated with this Service.
Host Inside this Engine element, each representing a different virtual host associated with this server. At least one Host is required, and one of the nested Hosts MUST have a name that matches the name specified for the defaultHost attribute.
Realm a “database” of usernames, passwords, and roles (similar to Unix groups) assigned to those users.

 

At last, I hope the information above could be like a reference book for Tomcat administrators because I’ve never seen such a guide even on the internet.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Justin Glauber
      Justin Glauber

      Thank you for compiling the information in a tidy and easily readable way!

       

      I would love to see examples of tomcat configurations optimized for business objects.

       

      SAP's documentation usually have an * about how the default configurations are only for testing and should not be utilized in production.

      Author's profile photo John Shen
      John Shen
      Blog Post Author

      I know exactly what you are concerning about, however, since Tomcat is a free third-party software, not an SAP product, so all we can do is collect as many as successful stories and write those into KBs.

      I hope those KBs can give you some ideas on Tomcat optimization.

      For the Tomcat support scope, you can check the following KB.

      2280098 - Does Apache Tomcat belong to Product Support scope?

      2405536 - Best Practice: The popular combinations of Tomcat Max Memory Pool size and MaxPermSize