It's not a secret anymore!*
The moose likes Struts and the fly likes Form validation: how can khow in jsp that my action validation failed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form validation: how can khow in jsp that my action validation failed?" Watch "Form validation: how can khow in jsp that my action validation failed?" New topic
Author

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

Boris Romashov
Ranch Hand

Joined: Feb 23, 2009
Posts: 38
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
jQuery in Action, 2nd edition
 
subject: Form validation: how can khow in jsp that my action validation failed?
 
Similar Threads
Struts2: bypass the prepare method?
Displaying error on an Applet
XSD validation
front-end validation in struts jsp page
boolean need_ of_ vbscript_in_jsp()