web.xml: servlet-name, init-param, servlet-mapping : web.xml « javax.servlet.http « Java by API






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

1.web.xml: filter-name and filter-mapping
2.web.xml: error page with error code
3.web.xml: error page with exception type
4.web.xml: context-param
5.web.xml: mime-mapping
6.web.xml: welcome-file-list
7.web.xml: session-config timeout
8.web.xml: security-constraint
9.web.config: login-config