Switch the tomcat listings options

This post is about how to override default tomcat options for each apps. For the default settings we used for tomcat will listings the directories when there is no feasible welcome pages. But we want to do separate settings for each apps.

After some search, according to this page: EnablingOrDisablingDirectoryListingsUsingWeb.xml, the answer is clear. That is, opening the configure file (web.xml) in what we want set up, and add the corresponding  <servlet> and <servlet-mapping> section as the example below.


<!– Add a mapping for our new default servlet –>

Then finished.

Leave a Reply

Your email address will not be published. Required fields are marked *