Java Learning 02-web.xml Configuration detailed

Source: Internet
Author: User

<?XML version= "1.0" encoding= "UTF-8"?><Web-appXmlns: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"ID= "webapp_id"version= "3.0">             <!--the icon element indicates the location of the IDE and GUI tools used to represent one and two image files of the Web App.  -    <icon></icon>        <!--The display-name element provides a name that GUI tools may use to mark this particular Web app.  -    <Display-name></Display-name>        <!--The description element gives explanatory text related to this.  -    <Description></Description>        <!--context-param Element declaration application-scoped initialization Parameters -    <Context-param></Context-param>        <!--The filter element associates a name with a class that implements the Javax.servlet.Filter interface.  -    <Filter></Filter>        <!--Filter-mapping Once a filter is named, use the filter-mapping element to associate it with one or more servlet or JSP pages.  -    <filter-mapping></filter-mapping>        <!--Listener support for event listeners, event listeners are notified when a session or servlet environment is established, modified, and deleted. The listener element indicates the event listener class.  -    <Listener></Listener>        <!--the servlet must first name the servlet or JSP page when it formulates initialization parameters or custom URLs to a servlet or JSP page. The servlet element is used to accomplish this task.  -    <servlet></servlet>        <!--The servlet-mapping server typically provides a default url:http://host/webappprefix/servlet/servletname for Servlets. However, this URL is often changed so that the servlet can access the initialization parameters or make it easier to handle relative URLs. Use the servlet-mapping element when changing the default URL.  -    <servlet-mapping></servlet-mapping>        <!--Session-config If a session is not accessed for a certain amount of time, the server can discard it to save memory. You can explicitly set a time-out value for a single Session object by using the Setmaxinactiveinterval method of HttpSession, or you can use the Session-config element to make a default timeout.  -    <Session-config></Session-config>        <!--mime-mapping The Mime-mapping element provides this assurance if the Web application has a special file that you want to guarantee to assign to them a specific MIME type.  -    <mime-mapping></mime-mapping>        <!--The welcome-file-list element indicates which file the server uses when it receives a URL that references a directory name instead of a file name.  -    <welcome-file-list></welcome-file-list>        <!--The error-page element enables the page to be displayed when a specific HTTP status code is returned, or when a particular type of exception is thrown.  -    <Error-page></Error-page>        <!--the Resource-env-ref element declares a management object that is associated with a resource.  -    <Resource-env-ref></Resource-env-ref>        <!--the Resource-ref element declares an external resource used by a resource factory.  -    <Resource-ref></Resource-ref>        <!--the Security-constraint element formulates the URL that should be protected. It is used in conjunction with the Login-config element -    <Security-constraint></Security-constraint>        <!--Use the Login-config element to specify how the server should authorize users attempting to access a protected page. It is used in conjunction with the Sercurity-constraint element.  -    <Login-config></Login-config>    <!--The security-role element gives a list of security roles that will appear in the Role-name child elements of the security-role-ref element within the servlet element. Declaring roles separately makes it easier for advanced Ides to handle security information.  -    <Security-role></Security-role>    <!--the Env-entry element declares the environment item for the web App.  -    <Env-entry></Env-entry>        <!--the Ejb-ref element declares a reference to the home directory of an EJB.  -    <Ejb-ref></Ejb-ref>        <!--the Ejb-local-ref element declares the application of an EJB's local home directory.  -    <Ejb-local-ref></Ejb-local-ref></Web-app>

Note: Extracted from http://www.cnblogs.com/ClassNotFoundException/p/6641867.html

Java Learning 02-web.xml Configuration detailed

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.