Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

form validation flow

 
Yi Zou
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A newbie's question:
When using ActionForm to validate data, if there is no error generated, the controller pass the ActionForm obj to Action to further process the request.
My question is what if there is error, where does controller forward the request to?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yi,
The controller forwards you to the action/jsp specified in the "input" attribute of the action.

For the future, Struts questions are best asked in our Web Applications Frameworks forum down below.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving this thread to the more appropriate Web Application Frameworks.

Mark
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yi Zou:
A newbie's question:
When using ActionForm to validate data, if there is no error generated, the controller pass the ActionForm obj to Action to further process the request.
My question is what if there is error, where does controller forward the request to?



if you use validate() method in ActionForm like this






When have some error in this method , you MUST config page/url for next page in application like this



Finally you should be created mehod for check error in Action Class like this




Thai will help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic