This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form validation: how can khow in jsp that my action validation failed?