aspose file tools*
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 Spring in Action this week in the Spring 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
 
 
subject: passing dynamic parameter in redirect