In my spring application , Am doing form processing using SimpleFormController. Does any one know , how to redirect the successView to another resource (URI) ..?
below is my configuration ,
<bean name="/one.htm" class="aaaaa.Bbbbbbbbb" >
`<property name="commandClass" value="abc.Def"/>`
`<property name="formView" value="one"/>`
`<property name="successView" value="two.htm"/>`
`<property name="validator" ref="loginValidator"/>`
</bean>
<bean name="/two.htm" class="xxxx.yyyy.Zzzzz" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
`<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>`
`<property name="prefix" value="/"/>`
`<property name="suffix" value=".jsp"/>`
</bean>
I开发者_开发百科 want , the success view should go to /two.htm . but it searches /two.jsp . What could be the reason for this ?
Use redirect:
prefix:
<property name="successView" value="redirect:/two.htm"/>
See also:
- 15.5.3.2 The redirect: prefix
精彩评论