Announcement Announcement Module
Collapse
No announcement yet.
mapping multiple view pages using annotation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mapping multiple view pages using annotation

    Hi,

    i am migrating the SimpleFormController to Annotation.
    In that migration, facing some issues like we have one controller which is common to some modules.

    In servlet context xml file , have mapped this controller for differenet url's (org.springframework.web.servlet.handler.SimpleUrl HandlerMapping), each entiry will had different view pages.

    Using the below code i have mapped different url's but unable to specify the jsp page(view)

    Code:
    @RequestMapping(value={"/formA.htm", "/formB.htm", "/formC.htm"})
    Sample Bean
    Code:
    <bean id="searchController"
    	class="com.search.web.SearchController">
    	<property name="commandName">
    		<value>SearchCommand</value>
    	</property>
    	<property name="commandClass">
    		<value>
    			com.search.web.SearchCommand
    		</value>
    	</property>
    	<property name="formView">
    		<value>search</value>
    	</property>		
    	<property name="searchService" ref="searchService" />
    </bean>
    
    <bean id="searchSortController"
    	class="com.search.web.SearchController">
    	<property name="commandName">
    		<value>SearchCommand</value>
    	</property>
    	<property name="commandClass">
    		<value>
    			com.search.web.SearchCommand
    		</value>
    	</property>
    	<property name="formView">
    		<value>searchPage</value>
    	</property>
    	<property name="searchService" ref="searchService" />
    </bean>
    Last edited by Muralihb; May 29th, 2012, 06:55 AM.

  • #2
    Can i get any steps to convert SimpleFormController to Annotation based.
    Since SimpleFormController is @deprecated in spring 3.0.

    Comment

    Working...
    X