Web. XML settings for Java Web-app

Source: Internet
Author: User

<?xml version= "1.0"  encoding= "UTF-8"?><web-app><!-- 1.icon --><icon ></icon><!-- 2.display-name  Define the name of the platform  --><display-name></display-name> <!-- 3.description  is a description of the platform  --><description></description><!-- 4. context-param  is used to set the environment parameters of the Web platform  --><context-param><param-name>param_name</param-name ><param-value>param_value</param-value></context-param><!-- 5.filter --> <filter><!--  Configuration Struts2 core Filter name  --><filter-name>struts2</filter-name><! --  Configuring the implementation class of the STRUTS2 core filter  --><filter-class>org.apache.struts2.dispatcher.filterdispatcher </filter-class><init-param><!--  Configure the STRUTS2 framework to load the action package structure by default, No.  --><param-name>actionPackages</param-name><param-value> org.apache.struts2.showcase.person</param-value></init-param><!--  Configure the configuration provider class for the STRUTS2 framework  --><init-param><param-name>configProviders</param-name> <param-value>lee. myconfigurationprovider</param-value></init-param></filter><!-- 6.filter-mapping  --><!--  Configure filter-intercept url --><filter-mapping><!--  Configure STRUTS2 core filterdispatcher to intercept all user requests  --><filter-name>struts2</filter-name><url-pattern >/*</url-pattern></filter-mapping><!-- 7.listener --><listener>< Listener-class>org.springframework.web.context.contextloaderlistener</listener-class></listener ><!-- 8.servlet  to declare data for a servlet  --><servlet><servlet-name>dwr-invoker< /servlet-name><display-name>dwr servlet</display-name><description>direct web  remoter servlet</description><servlet-class>uk.ltd.getahead.dwr.dwrservlet</ servlet-class><init-param><param-name>debug</param-name><param-value>true</param-value></init-param></ servlet><!-- 9.servlet-mapping --><servlet-mapping><servlet-name>dwr-invoker </servlet-name><url-pattern>/dwr/*</url-pattern></servlet-mapping><!-- 10. The session-config  is used to define the session parameters in the Web platform  --><session-config><session-timeout>30</ session-timeout></session-config><!-- 11.mime-mapping --><mime-mapping>< Extension>doc</extension><mime-type>application/vnd.ms-word</mime-type></mime-mapping ><mime-mapping><extension>xls</extension><mime-type>application/vnd.ms-excel</ mime-type></mime-mapping><!-- 12.welcome-file-list  to define the first page of the list  -->< welcome-file-list><welcome-file>index.jsp</welcome-file><welcome-file>index.html</ welcome-file></welcome-file-list><!-- 13.error-page --><error-page><error-code>404</error-code><location>/ Error404.jsp</location></error-page><error-page><exception-type>java.lang.exception </exception-type><location>/exception.jsp</location></error-page><!-- 14. jsp-config --><jsp-config></jsp-config><!-- 15.resource-env-ref -->< resource-env-ref><resource-env-ref-name>jdbc/mssql</resource-env-ref-name>< resource-env-ref-type>javax.sql.datasource</resource-env-ref-type></resource-env-ref><!--  16.resource-ref --><resource-ref><description>jndi jdbc datasource</ description><res-ref-name>jdbc/data</res-ref-name><res-type>javax.sql.datasoruce</ res-type><res-auth>container</res-auth></resource-ref><!-- 17.security-constraint  --><security-constraint><display-name>example security constraint</display-name><web-resource-collection>< web-resource-name>protected area</web-resource-name><url-pattern>/jsp/security/protected/* </url-pattern>


This article is from the "little Bit of Programming" blog, be sure to keep this source http://andylhx.blog.51cto.com/8891164/1745545

Web. XML settings for Java Web-app

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.