当我在action中定义了个rType变量时
利用myeclipse 8.6生成get,set方法
它将生成:
public String getrType() {
return rType;
}
public void setrType(String rType) {
this.rType = rType;
}
可以看到它生成的get,set方法名不正确。这样前台页面传值过来时。无法获取。但request中就可以。
解决办法:
手动修改下方法名即可。
public String getRType() {
return rType;
}
public void setRType(String rType) {
this.rType = rType;
}