In 1.0.2 you must define errors.header and errors.footer in your messages properties file. I believe in 1.1 this isn't required.

David






From: Ali Khan <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Question about ActionErrors & <html:errors>
Date: Fri, 31 Jan 2003 23:18:03 +0100

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]

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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

Reply via email to