You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anurag Garg <an...@nucleussoftware.com> on 2003/07/07 08:36:39 UTC

Error Message From Action Class

Hi All,

	In my Action class, If i get any exception I am populating my ActionErrors
object and passing that object in saveErrors method of the Action Class.
	Then I redirect the navigation to an error page defined in global forward
where i am using <html:errors /> to display the error message.
	Error page defined in the global forwards is displayed but the error
message is not displayed. Is there any way to acheive this functionality.
	Below is the code snippet from my Action Class.


	errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("NAMING"));
	saveErrors(request,errors);
	responsePage = "error";


Anurag Garg


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


RE: Error Message From Action Class

Posted by Anurag Garg <an...@nucleussoftware.com>.
Hi,

	Problem is solved. It was Error.jsp not error.jsp. Slight spelling mistake.

-----Original Message-----
From: Anurag Garg [mailto:anurag.garg@nucleussoftware.com]
Sent: Monday, July 07, 2003 12:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Error Message From Action Class


Yes..."NAMING" property is already there in the resource properties file...
This is my global forward mapping..

<forward name="error" path="/error.jsp"/>



-----Original Message-----
From: Dan Tran [mailto:danttran@hotmail.com]
Sent: Monday, July 07, 2003 12:19 PM
To: Struts Users Mailing List; anurag.garg@nucleussoftware.com
Subject: Re: Error Message From Action Class


Did you define a property called "NAMING" in your resource properties file?

-D
----- Original Message -----
From: "Anurag Garg" <an...@nucleussoftware.com>
To: <st...@jakarta.apache.org>
Sent: Sunday, July 06, 2003 11:36 PM
Subject: Error Message From Action Class


> Hi All,
>
> In my Action class, If i get any exception I am populating my ActionErrors
> object and passing that object in saveErrors method of the Action Class.
> Then I redirect the navigation to an error page defined in global forward
> where i am using <html:errors /> to display the error message.
> Error page defined in the global forwards is displayed but the error
> message is not displayed. Is there any way to acheive this functionality.
> Below is the code snippet from my Action Class.
>
>
> errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("NAMING"));
> saveErrors(request,errors);
> responsePage = "error";
>
>
> Anurag Garg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


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


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


RE: Error Message From Action Class

Posted by Anurag Garg <an...@nucleussoftware.com>.
Yes..."NAMING" property is already there in the resource properties file...
This is my global forward mapping..

<forward name="error" path="/error.jsp"/>



-----Original Message-----
From: Dan Tran [mailto:danttran@hotmail.com]
Sent: Monday, July 07, 2003 12:19 PM
To: Struts Users Mailing List; anurag.garg@nucleussoftware.com
Subject: Re: Error Message From Action Class


Did you define a property called "NAMING" in your resource properties file?

-D
----- Original Message -----
From: "Anurag Garg" <an...@nucleussoftware.com>
To: <st...@jakarta.apache.org>
Sent: Sunday, July 06, 2003 11:36 PM
Subject: Error Message From Action Class


> Hi All,
>
> In my Action class, If i get any exception I am populating my ActionErrors
> object and passing that object in saveErrors method of the Action Class.
> Then I redirect the navigation to an error page defined in global forward
> where i am using <html:errors /> to display the error message.
> Error page defined in the global forwards is displayed but the error
> message is not displayed. Is there any way to acheive this functionality.
> Below is the code snippet from my Action Class.
>
>
> errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("NAMING"));
> saveErrors(request,errors);
> responsePage = "error";
>
>
> Anurag Garg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


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


Re: Error Message From Action Class

Posted by Dan Tran <da...@hotmail.com>.
Did you define a property called "NAMING" in your resource properties file?

-D
----- Original Message ----- 
From: "Anurag Garg" <an...@nucleussoftware.com>
To: <st...@jakarta.apache.org>
Sent: Sunday, July 06, 2003 11:36 PM
Subject: Error Message From Action Class


> Hi All,
>
> In my Action class, If i get any exception I am populating my ActionErrors
> object and passing that object in saveErrors method of the Action Class.
> Then I redirect the navigation to an error page defined in global forward
> where i am using <html:errors /> to display the error message.
> Error page defined in the global forwards is displayed but the error
> message is not displayed. Is there any way to acheive this functionality.
> Below is the code snippet from my Action Class.
>
>
> errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("NAMING"));
> saveErrors(request,errors);
> responsePage = "error";
>
>
> Anurag Garg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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