1.5 create a deployment description file.
· Register for your servlets and create a url mapping
· Register and specify listeners and filters in the Application
· Specify the initialization parameters in the context.
· Configuration error page and welcome page
· Seeion configuration timeout
<? Xml version = "1.0" encoding = "ISO-8859-1"?>
<! DOCTYPE web-app PUBLIC "-// Sun Microsystems, Inc. // DTD Web application 2.3 //" http://java.sun.com/dtd/web-application_2_3.dtd ">
<Web-app>
<Display-name> Servlet 2.3 deployment descriptor </display-name>
<Filter>
<Filter-name> RequestFilter </filter-name>
<Filter-class> com. mydev. RequestFilter </filter-class>
</Filter>
<Filter-mapping>
<Filter-name> RequestFilter </filter-name>
<Url-pattern>/* </url-pattern>
</Filter-mapping>
<Listener>
<Listener-class> com. mydev. ReqListener </listener-class>
</Listener>
<Servlet>
<Servlet-name> MyServlet </servlet-name>
<Servlet-class> com. mydev. MyServlet </servlet-class>
</Servlet>
<Servlet-mapping>
<Servlet-name> MyServlet </servlet-name>
<Url-pattern>/myservlet </url-pattern>
</Servlet-mapping>
<Session-config>
<Session-timeout> 15 </session-timeout>
</Session-config> <error-page>
<Error-code> 404 </error-code>
<Location>/err404.jsp </location>
</Error-page>
</Web-app>