struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: How to make struts 2 to pass the correct parameter value even if it has ampersand in between?
Date Thu, 07 Mar 2013 12:04:21 GMT
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
View raw message