Thank you Matt, Joe Germuska's info cleared my problem : "Objects saved with saveMessages are retrieved by adding the "message='true'" attribute to the html:messages JSTL tag."
That attribute was missing in my jsp. Thanks, Alpay -----Original Message----- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 5:23 PM To: Struts Users Mailing List Subject: Re: ActionErros ok but ActionMessages fail Alpay Ozturk wrote: > Hi All, > > I am having a problem with ActionMessages. When I create an > ActionMessages instance in my action and add ActionMessage objects to > it, it is not displayed in my result jsp. But when I create an > ActionErrors instance and add ActionMessage ojects to it, it is > displayed. Below are the action and jsp codes. Only entry with key > error.2 is displayed in result jsp. What am I missing here? > > //Action Class > ActionMessages actionMessages = new ActionMessages(); > actionMessages.add("test", new ActionMessage("error.1")); > saveMessages(request, actionMessages); > > ActionErrors actionErros = new ActionErrors(); > actionErros.add("test2", new ActionMessage("error.2")); > saveErrors(request, actionErros); > > return mapping.findForward("success"); > > //result jsp > <html:messages id="actionMessage" property="test"> > <li><bean:write name="actionMessage"/></li> > </html:messages> > > <html:messages id="actionError" property="test2"> > <li><bean:write name="actionError"/></li> > </html:messages> > Alpay - Try <html:messages id="message" property="test"> and <html:messages id="error" property="test2"> instead of saying actionMessage/actionError. Matt --------------------------------------------------------------------- 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]