struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Gupta <motgu...@gmail.com>
Subject Re: How to make struts 2 to pass the correct parameter value even if it has ampersand in between?
Date Sun, 10 Mar 2013 12:46:55 GMT
Thanks Lukasz.

On Thu, Mar 7, 2013 at 5:34 PM, Lukasz Lenart <lukaszlenart@apache.org>wrote:

> Try to encode it or manually replace & => %26
>
> http://www.w3schools.com/tags/ref_urlencode.asp
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> 2013/3/7 Mohit Gupta <motgupta@gmail.com>:
> > i have struts 2 action which has following method
> >
> >   public String viewCustomer() {
> >     return "ViewCustomer";
> >   }
> >
> >  Here is the result annotation which redirect to another legacy action
> >
> >
> customer/view-Customer!viewCustomer.action?uid=10599&firstName=scott&lastName=Miles
> >   @Result(name = "ViewCustomer", location =
> > "/Customer.do?customerId=1&paraToRetain=%{#parameters.paraToRetain}"
> >         , type = "redirect"),
> >
> > The issue is with parameter paraToRetain. paraToRetain value is
> >  CustomerAddress.do?fisrtName=scott&lastName=Miles
> >
> > But in action CustomerAddressAction i get the value of  paraToRetain as
> > CustomerAddress.do?fisrtName=scott
> > not complete value i.e CustomerAddress.do?fisrtName=scott&lastName=Miles.
> > So basically it does not pass the
> > parameter correct value if it has ampersand somewhere in  the value. How
> >  can i make struts 2 to pass the correct
> > parameter value even if it has ampersand in between?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message