web.xml: servlet-name, init-param, servlet-mapping
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>
tea
</servlet-name>
<servlet-class>
com.go.teaservlet.TeaServlet
</servlet-class>
<init-param>
<param-name>
properties.file
</param-name>
<param-value>
<!-- Edit this to be an absolute path to your prop file -->
/tomcat/webapps/teatime/WEB-INF/TeaServlet.properties
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
tea
</servlet-name>
<url-pattern>
/tea/*
</url-pattern>
</servlet-mapping>
</web-app>
Related examples in the same category