my dog learned polymorphism*
The moose likes Struts and the fly likes Struts 2 - Displaying error messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - Displaying error messages" Watch "Struts 2 - Displaying error messages" New topic
Author

Struts 2 - Displaying error messages

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

I am trying to set up the validator framework with a form. A typical text field in the form is:

<s:textfield theme="simple" name="city"/>

The city name is required. What tag(s) do I need to use to display validation errors?

Thanks
Eric
Katie Doody
Ranch Hand

Joined: Nov 03, 2006
Posts: 90
I think this is what you are looking for.The corresponding xml file used for the validation of your form should have:

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts 2 - Displaying error messages
 
Similar Threads
struts2 select and js
how to specify composite data in s struts FORM
xsd : defining array
A Friend From China
Search best way