Hi,
in your case, you do not need to forward to another Controller. Making this could be done by something like:
Code:
return new ModelAndView(new RedirectView(...))
However, simple validation can be done by creating an additional class that inherits Validator. By setting this validator for your Controller in the servlet definition, all you need is done automatically.
Code:
<bean id="myValidator" class="my.package.my.validator" />
...
<bean name="/myAction.do" class="my.package.myAction">
<property name="formView"><value>login</value></property>
<property name="commandName"><value>whatEverYouWant</value></property>
<property name="validator"><ref bean="myValidator" /></property>
</bean>
So, when validation fails, it automatically returns to the formView; otherwise, it continues normally.
Hope this helps.
Kind regards,
Simon