File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - Displaying error messages" Watch "Struts 2 - Displaying error messages" New topic

Struts 2 - Displaying error messages

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230

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?

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:

I agree. Here's the link:
subject: Struts 2 - Displaying error messages
It's not a secret anymore!