Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing dynamic parameter in redirect" Watch "passing dynamic parameter in redirect" New topic

passing dynamic parameter in redirect

R .sourav nayak
Ranch Hand

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

hoping some one to answer this
robert isidorson

Joined: Sep 03, 2007
Posts: 19
For example :
ActionForward forward = new ActionForward("/"+id,);
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:
subject: passing dynamic parameter in redirect
It's not a secret anymore!