Sun Java System Web Server 7.0 Developer's Guide to Java Web Applications

Sample web.xml File

The following is the sample web.xml file.

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version="2.4">-
	<!--

   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 
-->
-
	<web-app>
<display-name>webapps-caching</display-name>
-
	<servlet>
<servlet-name>ServCache</servlet-name>
<servlet-class>samples.webapps.caching.ServCache</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
-
	<servlet-mapping>
<servlet-name>ServCache</servlet-name>
<url-pattern>/ServCache</url-pattern>
</servlet-mapping>
-
	<session-config>
<session-timeout>30</session-timeout>
</session-config>
-
	<taglib>
<taglib-uri>/com/sun/web/taglibs/cache</taglib-uri>
<taglib-location>/WEB-INF/sun-web-cache.tld</taglib-location>
</taglib>
</web-app>