HttpServlet----web. xml

Source: Internet
Author: User

<?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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.