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 directories — Overview on Tomcat directory functions.
- Two confusing names — Two basic concepts of Tomcat parameters.
- Element structure in server.xml — Detailed 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:
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.