When you add your error message to the errors object, you are specifying
Action.ERROR_KEY instead of ActionErrors.GLOBAL_ERROR -- so you'd have to do
something like

<html:errors property="something"/> to get that SPECIFIC error.  If you
switch to ActionErrors.GLOBAL_ERROR it will display all of them with just
<html:errors/>


----- Original Message -----
From: "Johan Kumps" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 4:02 PM
Subject: Validation problem


> Hi all,
>
> I have a problem displaying error messages. Why is my message not
displayed?
> Am I doing somthing wrong?
>
> Please help me, I'm loosing time with this one...
>
> Please consider following code :
>
> Form class :
>
> ...
>
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) {
>         ActionErrors errors = new ActionErrors();
>
>         if(email == null || !checkEmail(email)) {
>             errors.add(Action.ERROR_KEY, new
> ActionError("error.invalid.email"));
>         }
>         return errors;
>     }
>

> JSP :
>
> <html:errors/>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to