This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes help on forward on actionForm's validation fail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "help on forward on actionForm Watch "help on forward on actionForm New topic

help on forward on actionForm's validation fail

ashutosh dhiman

Joined: Oct 07, 2008
Posts: 7
i am using struts... i am validating my data in ActionForm's validate method..on validation fail it will by default "forward" to input page. now the url in browser will become the one which is my action's url to which i posted the content. i want it to change back to the page from which i posted the content....
for example:

from my / page i posted to / if validation fails... then browser will display url / i know this is happening because of forward. but i want to redirect.

this was the same case when i do it from My Action class by mapping.findforward(). this i was able to change by changing the <forward> tag i put one redirect='true there.. but i don't think so there is such option with forms...
help me..
I agree. Here's the link:
subject: help on forward on actionForm's validation fail
Similar Threads
problem with RequestDispatcher
Spring security intercept-url question
servlet mapping clarification
send redirect method
forwarding using handleNavigation method of NavigationHandler