View difference between Paste ID: CUWPFUkG and SVBsYMeR
SHOW: | | - or go back to the newest paste.
1
<?xml version="1.0" encoding="UTF-8"?>
2-
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
2+
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
	xmlns:beans="http://www.springframework.org/schema/beans"
4+
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
5-
	xmlns:context="http://www.springframework.org/schema/context"
5+
6-
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
6+
	<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
7-
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
7+
	<context-param>
8-
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
8+
		<param-name>contextConfigLocation</param-name>
9
		<param-value>/WEB-INF/spring/root-context.xml</param-value>
10-
	<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
10+
	</context-param>
11
	
12-
	<!-- Enables the Spring MVC @Controller programming model -->
12+
	<!-- Creates the Spring Container shared by all Servlets and Filters -->
13-
	<annotation-driven />
13+
	<listener>
14
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
15-
	<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
15+
	</listener>
16-
	<resources mapping="/resources/**" location="/resources/" /> 
16+
17
	<!-- Processes application requests -->
18-
	<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
18+
	<servlet>
19-
	<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
19+
		<servlet-name>appServlet</servlet-name>
20-
		<beans:property name="prefix" value="/WEB-INF/views/" />
20+
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
21-
		<beans:property name="suffix" value=".jsp" />
21+
		<init-param>
22-
	</beans:bean>
22+
			<param-name>contextConfigLocation</param-name>
23
			<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
24-
	<context:component-scan base-package="com.starter.web" />
24+
		</init-param>
25
		<load-on-startup>1</load-on-startup>
26
	</servlet>
27
		
28-
</beans:beans>
28+
	<servlet-mapping>
29
		<servlet-name>appServlet</servlet-name>
30
		<url-pattern>/</url-pattern>
31
	</servlet-mapping>
32
33
</web-app>