Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 - Custom Validation Method

 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic