Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Form validation: how can khow in jsp that my action validation failed?  RSS feed

 
Boris Romashov
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need output special info in JSP if validation failed. How can I do it? ActionSupport has method hasActionErrors. I need smth like that for JSP.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're not using the framework's error tags just use an <s:if test="hasActionErrors()"> (or whatever). You can call arbitrary functions via OGNL.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!