SSM development about the Web. XML configuration

Source: Internet
Author: User
Tags log4j

1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Web-appversion= "3.0" 3 xmlns= "Http://java.sun.com/xml/ns/javaee" 4 Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee6 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd ">7   <Display-name>Archetype Created Web Application</Display-name>8   <welcome-file-list>9     <Welcome-file>/web-inf/pages/index.jsp</Welcome-file>Ten   </welcome-file-list> One   <!--Configuring monitoring Spring - A   <Listener> -       <Listener-class>Org.springframework.web.context.ContextLoaderListener</Listener-class> -   </Listener> the   <!--Specify the directory where the spring bean's configuration files are located - -   <Context-param> -       <Param-name>Contextconfiglocation</Param-name> -       <Param-value>Classpath:applicationcontext-*.xml</Param-value> +   </Context-param> -    +   <!--Configure spring character encoding to Utf-8 - A   <Filter> at       <Filter-name>Encodingfilter</Filter-name> -       <Filter-class>Org.springframework.web.filter.CharacterEncodingFilter</Filter-class> -       <Init-param> -           <Param-name>Encoding</Param-name> -           <Param-value>UTF-8</Param-value> -       </Init-param> in       <Init-param> -           <Param-name>Forceencoding</Param-name> to           <Param-value>True</Param-value> +       </Init-param> -   </Filter> the   <filter-mapping> *       <Filter-name>Encodingfilter</Filter-name> $       <Url-pattern>/*</Url-pattern>Panax Notoginseng   </filter-mapping> -    the   <!--configuration of the Springmvc - +   <servlet> A       <Servlet-name>Spring</Servlet-name> the       <Servlet-class>Org.springframework.web.servlet.DispatcherServlet</Servlet-class> +       <Init-param> -           <Param-name>Contextconfiglocation</Param-name> $           <Param-value>Classpath:spring-servlet.xml</Param-value> $       </Init-param> -       <Load-on-startup>1</Load-on-startup> -   </servlet> the   <servlet-mapping> -       <Servlet-name>Spring</Servlet-name>Wuyi       <Url-pattern>/</Url-pattern> the   </servlet-mapping> -   Wu    -    About   <!--log4j Configuration - $   <Context-param> -       <Param-name>Log4jconfiglocation</Param-name> -       <Param-value>Classpath:log4j.properties</Param-value> -   </Context-param> A   <Context-param> +       <Param-name>Webapprootkey</Param-name> the       <Param-value>Slsalesystem.root</Param-value> -   </Context-param> $   <!--Spring-loaded log4j monitoring - the   <Listener> the       <Listener-class>Org.springframework.web.util.Log4jConfigListener</Listener-class> the   </Listener> the </Web-app>

SSM development about the Web. XML configuration

Related Article

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.