View Full Version : "redirect:url" ....???
javapedant
Aug 13th, 2007, 01:07 AM
I got an example of a controller which uses this statement inside its controller defn.
<bean id="personController" class="com.nave.task.PersonController">
<property name="formView" value="person"/>
<property name="successView" value="redirect:person.html" />
and the url mapping is defined as
<prop key="/person.html">personController</prop>
somebody please let me know what the redirect is doing there.
Jörg Heinicke
Aug 13th, 2007, 10:11 PM
Do you want to know what part of the configuration causes the redirect (it's the value of the successView property) or which component/ class evaluates this value and actually causes the redirect (I think it's DispatcherServlet, it's some time ago that I've seen this code)?
Joerg
javapedant
Aug 14th, 2007, 01:22 AM
Well....First of all apologies for not being clear. In all my task I worked on previously I used it as
<property name="successView" value="personHome" /> where the personHome is name of a Jsp which I would recquire when it is success. But now I see the redirect:url which is back to the same controller. I donno wether it's correct or not but the example I got, has this. ( But it doesn't execute anyways )
So I just what wanted to know the basic functionallity of that code(redirect:url)
mah01
Aug 14th, 2007, 09:46 AM
So I just what wanted to know the basic functionallity of that code(redirect:url)
http://www.springframework.org/docs/reference/mvc.html
Have a look at: 13.5.3.2. The redirect: prefix
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.