Action to take less than the value of the page

When writing code today, I encountered this problem, Action in the uIdStr how values ​​are empty:

 

 

jsp page code: <input name = "uIdStr" type = "text">

 

 

 

Action category:

private String uIdStr;    //多个ID字符串

public String getuIdStr() {
        return uIdStr;
}
public void setuIdStr(String uIdStr) {
        this.uIdStr = uIdStr;
}
 

 

Beginning how could not find exactly what was wrong, because the set and get methods are automatically generated, definitely wrong, did not go to look carefully, and later inadvertently beheld get and set methods other variable generated method names removed in front of the set or get the first letter is capitalized, then take a look at this not the value of the variable generated method is lowercase, but unfortunately the case again generate still has not changed, I had to manually put the first set, get the word uppercase letters changed, again running, you can get to the value.

 

 

Modified:

 

 

 

public String getUIdStr() {
        return uIdStr;
}

public void setUIdStr(String uIdStr) {
	this.uIdStr = uIdStr;
}
 

 

 

Perhaps my non-standard variable naming it, so myEclipse generated set, get the name of the method was not right, but also other variables camel nomenclature ah! Only this wrong, can not figure out, this might be too sensitive variable mix of it!

 

 

 

 

 

 

Reproduced in: https: //my.oschina.net/u/2260184/blog/540561

Guess you like

Origin blog.csdn.net/weixin_34240520/article/details/92186188