wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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("/youraction.do?id="+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
Don't get me started about those stupid light bulbs.
subject: passing dynamic parameter in redirect
Similar Threads
returning Dynamic result pages in struts 2.0
How to pass a dynamic parameter in struts-config.xml?
HTML Hidden value
redirect dynamic URL from action
dynamic/static ip