How do I override the default home page loaded by Tomcat?

asked Sep 13, 2013 in Tomcate by rajesh
edited Sep 12, 2013
0 votes

1 Answer

0 votes
After successfully installing Tomcat, you usually test it by loading http://localhost:8080 . The contents of that page are compiled into the index_jsp servlet. The page even warns against modifying the index.jsp files for this reason. Luckily, it is quite easy to override that page. Inside $TOMCAT_HOME/conf/web.xml there is a section called and it looks 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 $TOMCAT_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: 
 " rel="nofollow" target="_blank">"> 
This change takes effect immediately and does not require a restart of Tomcat.
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013