Tomcat 6 - Annotated Sample Configuration Files
Archive - Originally posted on "The Horse's Mouth" - 2009-03-01 09:10:45 - Graham EllisWhen you download Tomcat, it's pretty much "plug and play" ... once you've got your PATH and JRE_HOME environment variables set correctly. However, it's very unlikely that the default configuration is what you want, or is secure in the way you would like it to be. So you'll require to change the various configuration files such as context.xml, server.xml, web.xml and perhaps tomcat-users.xml. And being open source, the number of options and facilities you can turn on and off is mindblowing and you need to know what you're doing.
<advert>We can help you on our deploying Apache httpd and Tomcat course</advert>. And we also provide sample files and resources on our web site - in fact I have just uploaded a major new resource - an annotated set of Tomcat 6 configuration files, as we tailor them on our course but with some fairly long explanations and advise embedded within them. And these sample files are available to anyone to download and use at their own risk.
server.xml - this is the main configuration file controlling what connectors are available for users to contact the server, how it deploys applications, what domains it supports, etc.
web.xml - the file which controls what type of Java applications are supported by this Tomcat, and how web addresses (URLs) are mapped onto them.
context.xml - a file with some extra controls, such as security issues concerned with certain types of servlets, and whether or not user's sessions are to survive a reboot of the server.
tomcat-users.xml - this file controls who can log in to various roles; when Tomcat is just installed, it's useful to set this file up so that the Tomcat manager can be used to stop and start individual applications, and to monitor the performance of Tomcat.
Note that - although Servlets and JSPs transfer pretty easily from Tomcat 5.0 and 5.5 up to Tomcat 6, there are quite substantial changes in the sample configuration files provided as part of the distribution, and it's unlikely that your Tomcat 5.5 config files will work on Tomcat 6, or vice versa. (And, yes, we do have 5.5 samples available for training too!)