Hi Nico, it is working by giving multiple action mappings.
Thank you very much!!,
Pramod
"Nicolas De
Loof" To: "Struts Users Mailing List" <[EMAIL
PROTECTED]>
<nicolas.deloof cc:
@cgey.com> Subject: Re: error handling
06/27/2003
03:44 PM
Please respond
to "Struts
Users Mailing
List"
>
> But by doing in this way, for the forward name="failure" I will always end up in
> StatuicUpload.jsp
> (for the below example) I don't want to goto that jsp. I need to goto the parent
> page.
> Let me explain the scenario once again. From two different jsps (say a.jsp and
> b.jsp) I am coming
to
> an action (bt clicking the link in each jsp). From this action, upon an error I want
> to go back to
> "a.jsp" (if the request came from a.jsp) or to b.jsp (if the request came from
> b.jsp). So here I
> won't be able to hard code the path either as "a.jsp" or as "b.jsp" in the
> struts-config.xml. In
> you example upon error, it will always forward to StaticUpload.jsp
>
> Thanks,
> Pramod
If you really cannot set multiples action-mappings in struts-config.xml (that is the
cleaner way to
do), you can add a
parameter to your request for the "incoming" JSP :
<html:hidden name="from" value="/a.jsp"/>
and build a new forward in your action when errors occurs :
if (!errors.isEmpty()) {
saveErrors(request, errors);
String commingFrom = request.getParameter("from");
return new ActionForward(from);
}
Nico.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
********************************************
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]