So, I now have some more info about this problem, which could maybe help us
debug it:

If you open Struts' BaseHandlerTag.doErrorsExist(), which is called to set
the Error Style, it looks like this. Note the very last statement, the
&&-paired double condition for errorsExist.

  protected boolean doErrorsExist() throws JspException {

        boolean errorsExist = false;

        if (getErrorStyleId() != null ||
            getErrorStyle() != null ||
            getErrorStyleClass() != null) {
            String actualName = prepareName();
            if (actualName != null) {
                ActionMessages errors = TagUtils.getInstance()
                errorsExist = (errors != null && errors.size(actualName) >

For me, the SECOND condition is false, while the first one is true.
Condition #2 is not satisfied, because I have this:

1) actualName = "actionFormBean.contactPerson.firstName"
2) The Errors map holds a differently named string:

{ ... , contactPersonFirstName=[error.field.required[The Person to be
contacted First Name]] , ... }

So the actual key in the Errors Map is "contactPersonFirstName", but the
'actualName' var from prepareName() comes in as
"actionFormBean.contactPerson.firstName". The key isn't found, so the
highlight doesn't happen, and the style isn't applied.

Any thoughts on this?

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to