struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: Add paramaters to a forward dynamically
Date Sun, 12 Jan 2003 12:45:23 GMT
Sorry it didn't work for you and sorry I didn't include all the details such
as the algorithm used in
the example. The idea is the same though.

- Get the path from the existing ActionForward
- Manually append query string parameters to the path
- Create a new ActionForward with the modified path
- Return the new ActionForward

My example was simple so as to illustrate the basic goal.

I'm glad you found something that works.

robert

> -----Original Message-----
> From: John Menke [mailto:jm@basebeans.com]
> Sent: Saturday, January 11, 2003 5:46 PM
> To: Struts Users Mailing List
> Subject: RE: Add paramaters to a forward dynamically
>
>
> Robert,
>
> thanks for your suggestion.  I could not get it to work properly.
> Something
> with urls not being processed correctly, I'm using tiles...(not
> sure if that
> is explanation though)
>
> What I did get to work was what is suggested in this:
>
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14224.html
>
>
> -jm
>
>
>
>
>
>
>
>
> > -----Original Message-----
> > From: Robert Taylor [mailto:rtaylor@mulework.com]
> > Sent: Saturday, January 11, 2003 3:28 PM
> > To: Struts Users Mailing List; jm@basebeans.com
> > Subject: RE: Add paramaters to a forward dynamically
> >
> >
> > int id = // get user id
> > String path = forward.getPath();
> > path = path + "?ID=" + id;
> > return new ActionForward(path);
> >
> > hth,
> >
> > robert
> >
> > > -----Original Message-----
> > > From: John Menke [mailto:jm@basebeans.com]
> > > Sent: Saturday, January 11, 2003 2:57 PM
> > > To: struts-user
> > > Subject: Add paramaters to a forward dynamically
> > >
> > >
> > > I have a global forward:
> > >
> > > <forward name="DynamicForward" path="do/myModule" redirect="true"/>
> > >
> > > I really want the user to forward to "do/myModule?ID=115"
> > >
> > > the actual value of ID in this case would be determined in the
> > > Action class
> > > that calls the findForward("DynamicForward") method.
> > >
> > > is there any way of returning a forward with parameters from
> an Action?
> > >
> > > -jm
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:struts-user-help@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message