<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">
<Context-param> <Param-name>Contextconfiglocation</Param-name> <Param-value>Classpath*:applicationcontext.xml</Param-value> </Context-param> <!--registering Contextloaderlistener, loading the root app context - <Listener> <Listener-class>Org.springframework.web.context.ContextLoaderListener</Listener-class> </Listener> <!--register Dispatcherservlet, load application context - <servlet> <Servlet-name>Springmvc</Servlet-name> <Servlet-class>Org.springframework.web.servlet.DispatcherServlet</Servlet-class> <Init-param> <Param-name>Contextconfiglocation</Param-name> <Param-value>Classpath*:spring-servlet.xml</Param-value> <!--if the Add profile path is not displayed, the Servlt-name name + "-servlet.xml" will be loaded by default - </Init-param> <Load-on-startup>1</Load-on-startup> </servlet> <!--servlet Mappings - <servlet-mapping> <Servlet-name>Springmvc</Servlet-name> <Url-pattern>/</Url-pattern> </servlet-mapping></Web-app>
Common configuration Spring Framework Web. XML Common Configuration