Tomcat Example Applications

When installed out of the box, Tomcat includes a variety of sample applications. These are actually quite useful to people learning how to write JavaServer pages and servlets (look inside the CATALINA_HOME/weabpps and the CATALINA_HOME/conf/Catalina/localhost directories to see what webapps are already present in a fresh installation of Tomcat).

Because these examples are so helpful, you may wish to keep them deployed so you can learn from them; on the other hand, you may not want somebody else's examples showing up on your production web server. In that case, you should remove the example webapps from the CATALINA_HOME/webapps/ directory. One way of doing that is to just move them to a different directory, like this:

# cd $CATALINA_HOME
# mkdir moved-webapps
# mv webapps/*
moved-webapps/

Then, restart Tomcat to put these changes into effect.

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.