Hi pramod,
you once thoroughly take a look at actionerror and actionerrors docs.
If u want to route ur errors to the parent page,
give the following statement in your action class.
 
actionErrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("errors.tx.incomplete"));
    saveErrors(request, actionErrors);
    return (mapping.findForward("failure"));
 
Than in struts-config.xml,Add the following line.
 
<forward name="failure" path="/vascdt/StaticUpLoad.jsp" />    
          </action> 
 
 
Than in your jsp type down the following
<html:errors />
 
The above thing works for ActionErrors.GLOBAL_ERROR.If u want to handle individual 
errors u have to do minor modifications which any good struts tutorial can 
explain.Thats very simple.

 
Hope this helps.
Cheers
Prashanth
 
 


[EMAIL PROTECTED] wrote:

Hi, 
Can anyone send me a solution for the following problem: 
>From two jsps, I am coming to the same action class. (in the first jsp, I have a 
>link, clicking on 
this will go to an action say MyAction. From the second jsp also, I can goto the same 
action 
MyAction). In the MyAction class, how do I write code to return to the parent page 
when error 
occurs. (I am catching error using ActionErrors) 
path = "/MyAction" 
type = "mypackage.MyAction" 
name = "myFormBean" 
scope = "session"> 





Here, if the forward is success, i am able to got Result.jsp. But if any error is 
there, how do I 
display the error in the parent page? (I can come to this action from two different 
parent page) 
Please advise. 


Thanks, 


Pramod 










********************************************
This electronic mail message is intended solely for the named recipients and may 
contain
confidential and proprietary business information of eFunds Corporation and all its 
subsidiaries.
If you are not a named recipient, please notify the sender immediately. You may not 
disclose the
contents to any other person; use this electronic mail message or its contents for any 
other
purpose; or further store or copy its contents in any medium
********************************************


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



---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Reply via email to