This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Struts 2 - Displaying error messages
It's not a secret anymore!