Another possible way is to leverage the ActionRedirect class.

For example:

ActionRedirect redirect = new ActionRedirect(mapping.findForward("someRedirectingForwardDef"));
redirect.addParameter("cmp", companyName);
redirect.addParameter("myOtherParameter", myOtherParameterValue);
return redirect;

The framework takes care of building the query string, encoding, etc...

/robert
----- Original Message ----- From: "Struts User" <smtesting...@gmail.com>
To: <user@struts.apache.org>
Sent: Monday, August 23, 2010 6:01 PM
Subject: redirect with parameter in struts


Hi,

Is it possible in struts1 to include a parameter in the action redirection.
If I have a web application say, http://www..xyz.com/welcome.do and I want
to redirect it to http://www.xyz.com/welcomeredirect.do?cmp=company1 while
value of "cmp" will be assigned dynamically. how can I achieve this? Any
help or suggestion is greatly appreciated.

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to