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

Struts 2 - Custom Validation Method

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

I have complex validation logic I'd like to process by overriding the validate() method. If errors are found, how are they reported to the JSP? Right now, I can throw exceptions (which works) but leaves a stack trace on the screen instead of indicating which JSP fields have issues.


My Blog: Down Home Country Coding with Scott Selikoff
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Nevermind, found addFieldError(fieldName,message) to use. I wonder why I'm having such trouble finding documentation... sigh... Hopefully these posts are helping someone out there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 - Custom Validation Method