You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dmitry <dm...@worldnet.att.net> on 2002/08/29 19:12:15 UTC

senfing query strings in action forward

I'm trying to figure out how to forward success action to a jsp page
with parameters. For example,
I have a user.jsp page that shows user information, but it needs to be
invoked with user_id parameter like this:

user.jsp?user_id=100

When creating a new user, my action does all the db related stuff,
generates a new user_id, now, the question is how do I pass it (new
user_id) as a parameter to the success page. Can I attache something to
the instance of ActionForward that is being returned from execute
method.
It's essential that I could pass the parameters in the url rather then
in session so that the user can book mark the page. And besides that, I
already have a user.jsp page and really want to reuse it.

If I'm missing something conceptually, please advide the better way of
doing things like that.

Thanks.


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


Re: senfing query strings in action forward

Posted by dmitry <dm...@worldnet.att.net>.
Found the answer:

return new ActionForward(mapping.findForward("success").getPath() +"?user_id=" +
iserId);

Dmitry A.


dmitry wrote:

> I'm trying to figure out how to forward success action to a jsp page
> with parameters. For example,
> I have a user.jsp page that shows user information, but it needs to be
> invoked with user_id parameter like this:
>
> user.jsp?user_id=100
>
> When creating a new user, my action does all the db related stuff,
> generates a new user_id, now, the question is how do I pass it (new
> user_id) as a parameter to the success page. Can I attache something to
> the instance of ActionForward that is being returned from execute
> method.
> It's essential that I could pass the parameters in the url rather then
> in session so that the user can book mark the page. And besides that, I
> already have a user.jsp page and really want to reuse it.
>
> If I'm missing something conceptually, please advide the better way of
> doing things like that.
>
> Thanks.
>
> --
> 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>