Hi, 

      How do I get the "ActionErrors" object which have been saved in the
request.
Here is the code below .. I have hard coded for the time being to populate
the "ActionErrors" object.
Once a page populates this "ActionErrors" object how do I get a reference of
this object in one of my JSP 
Controller class ? I Can't do a request.getAttribute as the paramenter it
takes is a "string".

Any ideas .. Please help.


        ActionErrors errors = new ActionErrors();

        // For test purpose .. Adding Errors to the ActionErrors object
        //Hard Coded for the time being  .. ActionErrors object will be
populated from different pages
        errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ERROR1));
        errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ERROR2));
        errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ERROR3));
        errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ERROR4));
        saveErrors(request, errors);

      
        // JSP Controller class.
        //Count the total number of messages in the ActionErrors object
        ActionMessages errorMessages = errors;
        int errorCount = errorMessages.size();
        request.setAttribute("errorCount", Integer.valueOf(errorCount));



Thanks,
-Sanjeeb
--
View this message in context: 
http://www.nabble.com/How-to-get-the-%22ActionErrors%22-object-reference-----t1826184.html#a4981338
Sent from the Struts - User forum at Nabble.com.


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

Reply via email to