Hi Sandra, I've used html:errors to display my errors: In my Action From class: public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) { if(util.isEmpty(customerName)==true) { errorCheck=false; errors.add("customerAddressErr", new ActionError("customer.errorWarning1")); }//if }//validate
In the jsp, where I'm displaying the errors: <html:errors property="customerAddressErr" /> In my ApplicationResources.properties customer.errorWarning1 = Please specify valid address hope it helps -------anjali -----Original Message----- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 2:08 PM To: '[EMAIL PROTECTED]' Subject: Struts errors management Importance: High Hi, I have a lot of difficulties to display ActionForm validation errors in my struts application. Can someone explain me the différence betwwen the two tags struts:errors and html:errors ? Must I use ActionErrors or html:messages to display errors ?. It looks they are a lot of solution to managed ActionForm errors which is the better ? Is it better to use the validation.xml new feature fron the beta1.1 version ? I have declared a validate method in my ActionForm class and a tag html:errors in my JSP file and the following key in my applicationresource file "error.ON_id.mismatch=<li>Invalid ON_id, please try again</li>". But when I try to display error the following text is displayed ???en_GB.error.ON_id.mismatch??? ??? I don't known from where the text en_GB go. I think that the file ApplicationResource is well loaded because the key title is displayed. How can I be sure of that ? I passed a lot of time on this subject, thanks a lot to explain me the errors mechanism and give me a complete example. Sandra -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> Power your enterprise with custom solutions in eLearning and Knowledge Management from NIIT - Knowledge Solutions. For details visit our website http://www.ksb.niit.com ___________________NOTICE____________________________ This electronic mail transmission contains confidential information intended only for the person(s) named. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you received this transmission in error, please notify the sender by reply e-mail and then destroy the message. Opinions, conclusions, and other information in this message that do not relate to the official business of NIIT shall be understood to be neither given nor endorsed by NIIT When addressed to NIIT clients, any information contained in this e-mail is subject to the terms and conditions in the governing client contract. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>