This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How To Write validate() Instead of Using the validation.xml? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How To Write validate() Instead of Using the validation.xml?" Watch "How To Write validate() Instead of Using the validation.xml?" New topic
Author

How To Write validate() Instead of Using the validation.xml?

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I am submitteing a form. This form provides check boxes for multiple selections. I am not using the validation.xml to validate if "none" is selected. Instead, I am going to use the validate().

1. Do I write this validate() in the form class that extends the ActionForm?

2. how do I write this validate() method?

3. Where does this 'ae' return to?

My form class looks like:
tukai chakraborty
Greenhorn

Joined: Feb 02, 2004
Posts: 11
1.)u need to write the validate() method in the form.
2.)ae will return to ur input page,i.e. the jsp.and there u need to write the <html:errors/> to trap the the errors and display the error message in the jsp page.
3.)??? is any KEY u associate with the error object
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How To Write validate() Instead of Using the validation.xml?
 
Similar Threads
Validation
The constructor ActionError(String) is deprecated"!!
Cannot retrieve mapping for action
The server encountered an internal error (No input attribute for mapping path /login)
Getting error while running BeerStruts example