Actually when i am redirecting from legacy action to
customer/customer-creater!create.action?custId=200, struts
2 successfully does type conversion but not while forwarding the request to
same url though  same struts2 filter comes in to picture. Any ideas what
the issue ?


On Mon, Jun 23, 2014 at 4:07 PM, Mohit Gupta <motgu...@gmail.com> wrote:

> I am hitting the customerAction (struts 2 action) from my legacy action
> with url
> customer/customer-creater!create.action?custId=200
>
> As soon call goes to my customerAction i get below error
>
> ognl.MethodFailedException: Method "setCustId" failed for object
> com.actions.customer.CustomerCreateAction@c175e10
> [java.lang.NoSuchMethodException:
> com.actions.customer.CustomerCreateAction.setCustId([Ljava.lang.String;)]
>
>   private int                   custId          = -1;
>
>   public void setCustId(int custId) {
>     this.custId = custId;
>   }
>
>
>  Struts somehow searching for setCustId with string parameter where method
> exist with int parameter. As per my understanding struts 2
>  internally does type conversion. So i am not sure why i am getting this
> issue?
>

Reply via email to