struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Balakrishnan <Vijay.Balakrish...@MyHealthBank.com>
Subject RE: html:errors & ActionErrors.GLOBAL_ERROR
Date Tue, 17 Dec 2002 23:02:47 GMT
Hi,

I tried using saveErrors(request,errors) in the 1st action.But the 2nd
action to which it is forwarded doesn't seem to get the error.

Here is my code in the 2nd action:

while (enum.hasMoreElements()){
            Object obj = enum.nextElement();
            count++;
            log.debug("obj is:"+obj+" count:"+count);
 
log.debug("request.getAttribute:"+request.getAttribute(obj.toString()));
//this returns 3 objects-ApplicationConfig,ActionConfig and
PropertyMessageResources
        }

        ActionErrors errors = (ActionErrors)request.getAttribute(ERROR_KEY);
        log.debug("errors is:"+errors);//this is null

Thanx,
Vijay

-----Original Message-----
From: Sri Sankaran [mailto:Sri.Sankaran@sas.com]
Sent: Tuesday, December 17, 2002 5:47 AM
To: Struts Users Mailing List
Subject: RE: html:errors & ActionErrors.GLOBAL_ERROR


Are you invoking saveErrors() in the action that generates the ActionErrors?

Sri

-----Original Message-----
From: Vijay Balakrishnan [mailto:Vijay.Balakrishnan@MyHealthBank.com] 
Sent: Monday, December 16, 2002 4:48 PM
To: 'struts-user@jakarta.apache.org'
Subject: html:errors & ActionErrors.GLOBAL_ERROR


Hi,

I am doing the following in the first Action:
ActionErrors errors = new ActionErrors();
               errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("individual.backbutton.error")); 
               return forward; 

I am forwarding to another Action which in turn forwards to another
Action.This last Action then forwards to a jsp page.I am displaying a
<html:errors /> in the final jsp page and want to display the error message
set in the first action. 

Right now,the jsp page doesn't show the error message.How can i get the
message displayed ? 

Thanx,
Vijay


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message