struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasad iyer <>
Subject Re: redirect with parameter
Date Thu, 10 Dec 2009 23:33:29 GMT
Hi Neil,

Thanks a lot.

I solved the problem 
<package name="org.cross.signup" extends="struts-default">
             <action name="SignUpAction" class="org.cross.SignUpAction">
             <result name="redirecturl" type="redirect">
                          <param name="location">/${redirecturl}?${urlparameters}</param>
                          <param name="parse">true</param>
                          <result name="input">/left/jsp/signup/signup.jsp</result>
                         <result name="error">/left/jsp/signup/signup.jsp</result>


I am getting redirecturl from property and urlparameters has the getter and setter in Action
I can't use the 
<param name="encode">true</param> because it encodes both redirecturl and urlparameters.


----- Original Message ----
From: Neil Aggarwal <>
To: Struts Users Mailing List <>
Sent: Thu, 10 December, 2009 15:20:55
Subject: RE: redirect with parameter


> I am stuck with a problem I want to add parameters to
> redirect. Following is the example.

Here is what works for me:

In struts.xml:
  <result name="success" type="httpheader">
    <param name="status">303</param>
    <param name="headers.location">${redirectUrl}</param>

I generate the full url in my bean code including all
parameters I want encoded.

I hope that helps,

Neil Aggarwal, (281)846-8957,
Host your struts app on a CentOS VPS for only $25/month!
Unmetered bandwidth = no overage charges, 7 day free trial

To unsubscribe, e-mail:
For additional commands, e-mail:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message