pegasus974

SpringMVC\web\WEB-INF\dispatch

Jun 9th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.87 KB | None | 0 0
  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <!-- was: <?xml version="1.0" encoding="UTF-8"?> -->
  3. <beans xmlns="http://www.springframework.org/schema/beans"
  4.       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.       xmlns:p="http://www.springframework.org/schema/p"
  6.       xmlns:aop="http://www.springframework.org/schema/aop"
  7.       xmlns:tx="http://www.springframework.org/schema/tx"
  8.       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
  9.       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
  10.       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
  11.  
  12.     <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>
  13.       <!-- the application context definition for the springapp DispatcherServlet -->
  14.  
  15.     <!--<bean name="/index.htm" class="com.fernando.controller"/>-->
  16.  
  17.  
  18.     <!--
  19.    Most controllers will use the ControllerClassNameHandlerMapping above, but
  20.    for the index controller we are using ParameterizableViewController, so we must
  21.    define an explicit mapping for it.
  22.    -->
  23.     <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
  24.         <property name="mappings">
  25.             <props>
  26.                 <prop key="index.htm">indexController</prop>
  27.             </props>
  28.         </property>
  29.     </bean>
  30.  
  31.     <bean id="viewResolver"
  32.          class="org.springframework.web.servlet.view.InternalResourceViewResolver"
  33.          p:prefix="/WEB-INF/jsp/"
  34.          p:suffix=".jsp" />
  35.  
  36.     <!--
  37.    The index controller.
  38.    -->
  39.     <bean name="indexController"
  40.          class="org.springframework.web.servlet.mvc.ParameterizableViewController"
  41.          p:viewName="index" />
  42.  
  43. </beans>
Advertisement
Add Comment
Please, Sign In to add comment