This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes passing dynamic parameter in redirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing dynamic parameter in redirect" Watch "passing dynamic parameter in redirect" New topic
Author

passing dynamic parameter in redirect

R .sourav nayak
Ranch Hand

Joined: May 14, 2006
Posts: 67
hi,
could some one send me some example how to pass dynamic parameter in redirect.

hoping some one to answer this
thanks
robert isidorson
Greenhorn

Joined: Sep 03, 2007
Posts: 19
For example :
ActionForward forward = new ActionForward("/youraction.do?id="+id,);
forward.setRedirect(true);
return forward;

You can also check out the ActionRedirect class in the documentation.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
A "feature" of Struts is that an ActionForward returned from findForward cannot be modified. Below is a utility method that I put together a while back to make it easy to add a dynamic parameter to an ActionForward.



- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing dynamic parameter in redirect