Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts 2 - Custom Validation Method  RSS feed

 
Scott Selikoff
author
Bartender
Posts: 4087
21
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
Bartender
Posts: 4087
21
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!