aspose file tools*
The moose likes Struts and the fly likes How to find out which form generated errors ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to find out which form generated errors ?" Watch "How to find out which form generated errors ?" New topic
Author

How to find out which form generated errors ?

Sreedevi Vinod
Ranch Hand

Joined: Jan 17, 2005
Posts: 117
I have a login form and a registration form on the same JSP page. I have server side validations attached to both. I'm using <html:errors> tag to print out the validation errors. I want the validation errors returned by the login form to appear in the area above it, and those returned by the registration form to appear above it. When I use <html:errors> at both places, the same errors are printed at both places when any one form fails validation. How can I write code to detect which form caused the error, so that the errors appear only at the right place ?

Thanks
Devi
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
See the section entitled "Displaying Messages" in this link.


Merrill
Consultant, Sima Solutions
Sreedevi Vinod
Ranch Hand

Joined: Jan 17, 2005
Posts: 117
Thanks so much for the link. My problem is solved.

-Devi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find out which form generated errors ?