Well, I think your resource file is missing header and footer properties.
try to add

errors.header=
errors.footer=

at the top of your resource file.

hope it helps.

ATTA

----- Original Message -----
From: "Ali Khan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 2:18 PM
Subject: Question about ActionErrors & <html:errors>


> Hi,
>
> have made an simple struts-application. I got one problem.
>
> That is when my actionerrors are shown generated with <html:errors />,
> it shows null in start and in the end of the error-messages. Don't
> understand why the null's occur ? It shows like this:
> ----------------
> null Definition not filled
> Paymenttype not filled
> null
> -----------------
>
> Here is my code:
> ---
> In ActionForm:
>   public ActionErrors validate(ActionMapping mapping,
>                                  HttpServletRequest request) {
>         ActionErrors errors = new ActionErrors();
>
>         if(paymenttype == null || "".equals(paymenttype)){
>             errors.add("paymenttype",new ActionError("errors.typename"));
>         }
>
>         if(definition == null || "".equals(definition)){
>             errors.add("definition",new ActionError("errors.comment"));
>         }
>         return errors;
>     }
> ---
> In ApplicationResources.properties:
> errors.typename=<b>Definition not filled</b><br>
> errors.comment=<b>Paymenttype not filled</b><br>
> -----
> In web.xml:
> ...................
> ...................
> <init-param>
>          <param-name>application</param-name>
>          <param-value>ApplicationResources</param-value>
>    </init-param>
> ...................
> .................
>
> All help appreciated.
> Thanx.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to