The errorStyleClass attribute on the <html:text> Struts 1.3 tag is not
working for me. It's supposed to highlight the error fields accumulated
correctly in the ActionErrors collection.

In the output HTML I see the error style isn't included. It only has the
original class that came from styleClass. The error highlighting should be
in pink color, as below.

JSP: note the "has-error" errorStyleClass

    <html:text styleId="startDate"
       styleClass="dateValue" errorStyleClass="has-error" 
       size="20" name="formBean"
       readOnly="${readOnly}" maxlength="10" />


.has-error {
    background-color: pink;

In the output HTML, the new error style is *not* included.

<input type="text" name="actionFormBean.startDate" maxlength="10" size="20"
value="" id="startDate" class="dateValue" title="Date in MM/DD/YYYY format">

Server-Side Accumulation of messages in ActionErrors:

ActionErrors errors = form.validate(mapping, request);
saveErrors(request, errors);

Display of errors in the JSP

    <logic:messagesPresent message="false">
        <div class="errors_div">
        <html:messages id="aMsg" message="false">
            <logic:present name="aMsg">
                <div class="errors">
                    <bean:write name="aMsg" filter="false" />

Thanks a lot for any help

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