If you want to preserve errors and messages across a redirect you can you this interceptor:
http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ On Sun, Jul 12, 2009 at 10:18 AM, taj uddin <tajuddi...@yahoo.com> wrote: > Hi Kavitha, > > The action error message will not be carried to the JSP page if u r > doing the redirect-action. The Message will be lost. If so, then u have to > store the error message in the session and retrieve it in the redirected > action class. > In case, if u r not doing the redirect-action, then please remove the id > attribute fron the <s:actionerror> tag and try again. > > My guess would be, u must be redirecting the action on success. > > --- On Thu, 7/9/09, Kavita Mehta <kavita.me...@hsc.com> wrote: > > > From: Kavita Mehta <kavita.me...@hsc.com> > Subject: <s:actionerrors> not displaying errors! > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Thursday, July 9, 2009, 9:14 AM > > > Hi, > I am using Struts 2.0 and I am not able to display the action errors in > my JSP. > > Action class code : > > if( ( getSelectedlocation() == null ) || getSelectedlocation().compareTo( > "" ) == 0 > && ( (getLocation() == null ) ||( > getLocation().compareTo( "" ) == 0 ))) > { > mLog.warn( "Location not > specified. Added Error message" ); > addActionError( "Please specify a > Location for the message . " ); > } > > > JSP code : > > <tr> > <td align="left" valign="top"><p><s:actionerror id="err" /></p></td> > </tr> > > > The error is added successfully as i can see from the logs but it is not > getting displayed on the JSP ..any pointers ? > > > Thanks, > Kavita > > > > > > > *****************************************************DISCLAIMER***************************************************** > > This message and/or attachment(s) contained here are confidential, > proprietary to HUGHES SYSTIQUE and its customers. > Contents may be privileged or otherwise protected by law. The information > is solely intended for the entity it is > addressed to. If you are not the intended recipient of this message, it is > strictly prohibited to read, forward, > print, retain, copy or disseminate this message or any part of it. If you > have received this e-mail in error, > please notify the sender immediately and delete the message. > > > ******************************************************************************************************************** > > > > >