<?xml version= "1.0" encoding= "UTF-8"?>
<web-app xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
Xmlns= "Http://java.sun.com/xml/ns/javaee"
xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version= "3.0" >
<display-name>secondWeb</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>context</param-name>
<param-value> This is the value of the context </param-value>
</context-param>
<!--set the time the session exists in the Web. xml file, which is currently set to 40 minutes. There are three ways to set the duration of a session
1, in the Server conf folder in the Web file to modify the Session-config inside the time, the unit is minutes
2, set the time in the current file, the unit is minutes
3, in the Java file through the Setmaxinactiveinterval (time) method to set the times, the unit is the second, negative means not expired
These three execution sequences follow the nearest principle, i.e. priority 3>2>1-->
<!--session destruction includes three types of
1, set the session time has expired
2. Call the Invalidate () method directly on the Session object
3. Reset the service to
<session-config>
<session-timeout>40</session-timeout>
</session-config>
<servlet>
<servlet-name>first</servlet-name>
<servlet-class>secondWeb.one</servlet-class>
</servlet>
<servlet>
<servlet-name>second</servlet-name>
<servlet-class>secondWeb.second</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>first</servlet-name>
<url-pattern>/first</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>second</servlet-name>
<url-pattern>/second</url-pattern>
</servlet-mapping>
</web-app>
HttpServlet----web. xml