struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Gupta <motgu...@gmail.com>
Subject How to make struts 2 to pass the correct parameter value even if it has ampersand in between?
Date Thu, 07 Mar 2013 11:46:52 GMT
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?

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