You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christian Pich <pi...@llauwl.com> on 2002/07/22 20:51:59 UTC

Including parameters in Forward

How do specify additional parameters in the forwarding, e.g.
for one of my actions I have
<forward name="success"  path="/Admin/main.jsp"/>
but I would like to add parameters.
I can add them in the Action Servlet manually by retrieving
the path of the mapping (mapping.findForward("success").getPath())
and then add my parameters and create a new ActionForward.
Is there a better way to do this?
How does Struts envison this?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Including parameters in Forward

Posted by Christian Pich <pi...@llauwl.com>.
But how do I set the parameters in the Action Class? I had to parse the 
mapping
path and then replace the values. Is there a class to help in doing this?

Cedric Dumoulin wrote:

>
>  Try something like this:
>  <forward name="success"  
> path="/Admin/main.jsp?param1=aValue&param2=aValue"/>
>
>   Cedric
>
> Christian Pich wrote:
>
>> How do specify additional parameters in the forwarding, e.g.
>> for one of my actions I have
>> <forward name="success"  path="/Admin/main.jsp"/>
>> but I would like to add parameters.
>> I can add them in the Action Servlet manually by retrieving
>> the path of the mapping (mapping.findForward("success").getPath())
>> and then add my parameters and create a new ActionForward.
>> Is there a better way to do this?
>> How does Struts envison this?
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Including parameters in Forward

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  Try something like this:
  <forward name="success"  
path="/Admin/main.jsp?param1=aValue&param2=aValue"/>

   Cedric

Christian Pich wrote:

> How do specify additional parameters in the forwarding, e.g.
> for one of my actions I have
> <forward name="success"  path="/Admin/main.jsp"/>
> but I would like to add parameters.
> I can add them in the Action Servlet manually by retrieving
> the path of the mapping (mapping.findForward("success").getPath())
> and then add my parameters and create a new ActionForward.
> Is there a better way to do this?
> How does Struts envison this?
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>