You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by olivier <ol...@club-internet.fr> on 2001/04/22 18:37:18 UTC
How to get 2 different forward in struts-config
Hi,
I am using struts 1.0b
I have an Action which should return 2 different .jsp (located in different
directory), depending on a flag.
Basically, the code looks like:
if(Constants.ACTION_CREATE.equals(action))
return (mapping.findForward("successCreate"));
else
return(mapping.findForward("successEdit"));
My struts-config looks like:
<forward name="successEdit" path="/taskforce/welcome.jsp"/>
<forward name="successCreate" path="/welcome.jsp"/>
It looks like struts does not like it...
if I use:
return (mapping.findForward("success"));
<forward name="success" path="/welcome.jsp"/>
It works.
Is is not possible to rename the forward action???
Are we limited to "success" and "failure" ??
Is there another way to do this ??
Thanks for your thinking.
Olivier
RE: How to get 2 different forward in struts-config
Posted by olivier <ol...@club-internet.fr>.
Sorry.
User error.
It is working all right
Olivier
-----Original Message-----
From: olivier [mailto:olivier_poppon@club-internet.fr]
Sent: 22 April 2001 17:37
To: struts list
Subject: How to get 2 different forward in struts-config
Hi,
I am using struts 1.0b
I have an Action which should return 2 different .jsp (located in different
directory), depending on a flag.
Basically, the code looks like:
if(Constants.ACTION_CREATE.equals(action))
return (mapping.findForward("successCreate"));
else
return(mapping.findForward("successEdit"));
My struts-config looks like:
<forward name="successEdit" path="/taskforce/welcome.jsp"/>
<forward name="successCreate" path="/welcome.jsp"/>
It looks like struts does not like it...
if I use:
return (mapping.findForward("success"));
<forward name="success" path="/welcome.jsp"/>
It works.
Is is not possible to rename the forward action???
Are we limited to "success" and "failure" ??
Is there another way to do this ??
Thanks for your thinking.
Olivier