Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

form validation flow

 
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?
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • 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.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE 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
 
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.
 
    Bookmark Topic Watch Topic
  • New Topic