aspose file tools*
The moose likes Struts and the fly likes form validation flow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form validation flow" Watch "form validation flow" New topic
Author

form validation flow

Yi Zou
Greenhorn

Joined: Mar 05, 2004
Posts: 14
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

Joined: May 26, 2003
Posts: 30929
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

I am moving this thread to the more appropriate Web Application Frameworks.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
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.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: form validation flow