Skip to content

Instantly share code, notes, and snippets.

@hfknight
hfknight / gist:5707408
Created June 4, 2013 16:36
Customize Tomcat Directory Listings
1. in tomcat/conf/server.xml, add the directory to appBase paramter in Host section
<Host name="test.example.com" appBase="/mnt/example" autoDeploy="true" reloadable="true">
2. in the listing directory, add WEB-INF/ folder, add web.xml in WEB-INF w/ the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">