<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

  <!-- Fixed properties -->
  <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass"><value>org.springframework.web.servlet.view.JstlView</value></property>
    <property name="prefix"><value>/jsp/</value></property>
    <property name="suffix"><value>.jsp</value></property>
  </bean>


  <!-- Custom controller objects -->
  <bean id="moController" class="org.annotationmvc.web.MyObjectController">
    <property name="myObjectService"><ref bean="myObjectService"/> </property>
  </bean>

  <bean id="moFormController" class="org.annotationmvc.web.MyObjectFormController">
    <property name="sessionForm"><value>true</value></property>
    <property name="commandName"><value>myobject</value></property>
    <property name="commandClass"><value>org.annotationmvc.vo.MyObjectVO</value></property>
    <property name="formView"><value>MyObjectForm</value></property> <!-- Interesting, you cannot add the suffix here, it will append the .jsp -->
    <property name="successView"><value>test.html</value></property> <!-- you MUST add the suffix here, otherwise it won't append the suffix itself -->
    <property name="mos"><ref bean="myObjectService"/></property>
  </bean>

  <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
      <props>
        <prop key="/test.html">moController</prop>
        <prop key="/MyObjectForm.html">moFormController</prop>
      </props>
    </property>
  </bean>

</beans>
