The EL expression Gets the object property in the same way: the expression ${user.name} is an example of an El expression that finds the Get method of the name in the user class based on name, and automatically capitalizes the name and the get prefix, once the matching method is found, The EL expression considers this to be the property to be accessed and returns the value of the property. So, to get the value of an object's property through an El expression, this property must have a corresponding get method.
So this is not about the private property, it is called the Get/set method of the private property.
If you don't write the Get/set method, the El expression will not get the value. The set method is used to set values for your background.
Public String GetName () { return "aaaaaaaa";} Public String GETABCCCC () { return "ABCCCCCCC"; } Public String Getabcd () { return "ABCD";}
< BR > ${name}---------${name} will directly error, El expression throws an exception, according to the results of the following line, when the first letter of the El expression uppercase, will determine the second letter case, lowercase throw exception, uppercase is directly stitching get, Form Getter Method
< BR > ${ABCCCC}--------${ABCCCC} cannot get value
< BR >${ABCD}
Summarize
When the first letter of the El expression is capitalized, it will judge the second letter case, lowercase, throw exception, uppercase, then directly stitching get, form getter method
When the first letter of the El expression is lowercase, the second letter is case-uppercase, the first letter must be capitalized; otherwise, the value cannot be obtained.
El First letter uppercase, at least the second letter must be capitalized.
The first letter case of the EL expression