com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(CommonsLogger.java:49)Error setting expression 'appAcctOrgBindIp.bindIpEndip' with value '[Ljava.lang.String;@30ae8764'
ognl.OgnlException: bindIpEndip [java.lang.IllegalArgumentException: argument type mismatch]
我的代码里有appAcctOrgBindIp类属性是bindIpEndip,
前台表单里面有属性名appAcctOrgBindIp.bindIpEndip
但是对接受的参数提示以上错误
参数值为192.169.23.11
代码如下:
jsp:
结束ip: <input id="endip" name="appAcctOrgBindIp.bindIpEndip" onblur="validateip()"/>
java代码:
private AppAcctOrgBindIp appAcctOrgBindIp;
public AppAcctOrgBindIp getAppAcctOrgBindIp() {
return appAcctOrgBindIp;
}
public void setAppAcctOrgBindIp(AppAcctOrgBindIp appAcctOrgBindIp) {
this.appAcctOrgBindIp = appAcctOrgBindIp;
}
请大虾们指点下3Q了struts

解决方案 »

  1.   

    参数类型不匹配加上 input 的 type 属性看看<input id="endip" type="text" name="appAcctOrgBindIp.bindIpEndip" onblur="validateip()"/>
      

  2.   

    典型的参数类型不匹配异常。
    setting expression 'appAcctOrgBindIp.bindIpEndip' with value '[Ljava.lang.String;@30ae8764'是说赋值时异常,appAcctOrgBindIp.bindIpEndip字段不能使用前台传过来的String型赋值。
    <input id="endip" name="appAcctOrgBindIp.bindIpEndip" onblur="validateip()"/>里的值是String型的,你得确定你的appAcctOrgBindIp.bindIpEndip也是String型,或者在赋值前进行类型转换。
      

  3.   

    appAcctOrgBindIp的bindIpEndip属性是String类型么
      

  4.   

    appAcctOrgBindIp的bindIpEndip属性是String类型
      

  5.   

    看看form是否设置了enctype属性
      

  6.   

    参数问题前台传过去的是String类型~
      

  7.   

    设置了enctype属性属性不行
    前台传过去的值无法转换为String类型