Color of Error Messages in struts 2


I am working on struts 2.
I have one text field and have put validation (with xml)on the text field if its blank, throw an error.
But the field error I am getting is in black colour.
Does anyone have idea how to display the field error in red colour.


U can the use the following tag in your .css Stylesheet file

.errorMessage {
color: red;
font-size: 0.8em;

And include this Stylesheet in the file where u have the text field.

Source :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.