Published on Sep 8 2011 in Java Tomcat

Tomcat default home page contains links to examples, documaentation and management applications. See how to change it.

With Tomcat on dedicated JVM, you usually test it by loading (If the default web server to application server catch-all mapping is set for your domain). The contents of that page are compiled into the index_jsp servlet. It is quite easy to override that page. In $CATALINA_HOME/conf/web.xml there is a section called and it may look like this:


The default servlet attempts to load the index.* files in the order listed. You may easily override the index.jsp file by creating an index.html file at $CATALINA_HOME/webapps/ROOT. It's somewhat common for that file to contain a new static home page or a redirect to a servlet's main page. A redirect would look like:

   <meta http-equiv="refresh" content="0; URL=">

This change takes effect immediately and does not require a restart of Tomcat.

Changing Tomcat's default web application

Implicit default web application is set to webapps/ROOT. To change it you can add

<Context path="" docBase="new_default_app" />

in Host entry for localhost in server.xml. Localhost Host is serving all requests until you define additional more specific Host(s).