David,

Thank you for the good link. Base on it, I have change the code to the
following:

------------------------------------------------------------------------------------
         
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.util.MessageResources;

.
.
.
     
public ActionMessage validate(HttpServletRequest request) {
        
    ActionMessages messages = new ActionMessages(); 
                
    if (firstName == null || firstName.trim().equals("")) {

          messages.add( ActionMessages.GLOBAL_MESSAGE,  
                        new ActionMessage( "not.authorized.for.account"
) ); 
                
          saveErrors(request,messages);
      }
}

------------------------------------------------------------------------------------
  

I have got the error of:

The method saveErrors is undefined.

Have I missed out anything.

Thank you again.

Regards,

Tuan

>>> [EMAIL PROTECTED] 18/Aug/2005 12:27:14 pm >>>
Tuan,

I think you should check out various wiki sections relating to the
versions
you're using and the one you plan on switching over to.  You probably
want
to scroll down to the section marked "ActionError(s) and
ActionMessage(s)"
in the page: http://wiki.apache.org/struts/StrutsUpgradeNotes11to124 

Regards,
David

-----Original Message-----
From: Tuan Jean Tee [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 17, 2005 10:14 PM
To: user@struts.apache.org 
Subject: What do you do with ActionError in Struts 1.2

I am learning Struts 1.2 and would like to find out what is the
replacement
for ActionError knowing it's deprecated in Struts 1.2

if (firstName == null || firstName.trim().equals(""))
{
        errors.add("firstName", new
                ActionError("error.cust.firstname.empty"));
}


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



IMPORTANT -

Please consider our environment before printing this email.

This email and any attachments are confidential and may be legally privileged 
in which case neither is intended to be waived or lost by mistaken delivery to 
you. If you have received this message in error, please notify us and remove it 
from your system. If you are not the intended recipient, any unauthorised use 
is expressly prohibited.  It is your responsibility to check any attachments 
for viruses and defects before opening or sending them on. Minter Ellison 
collects personal information to provide and market our services. For more 
information about use, disclosure and access, see our privacy policy at  
http://www.minterellison.com


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

Reply via email to