struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taj uddin <tajuddi...@yahoo.com>
Subject Re: <s:actionerrors> not displaying errors!
Date Sun, 12 Jul 2009 14:18:47 GMT
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.Mehta@hsc.com> wrote:


From: Kavita Mehta <Kavita.Mehta@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.

********************************************************************************************************************




      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message