文档详情

EL表达式+(详解)(国外英文资料).doc

发布:2017-06-05约1.27万字共21页下载文档
文本预览下载声明
EL表达式+(详解)(国外英文资料) EL expressions (detailed solutions) EL expressions 1, the introduction of EL 1) the grammatical structure The ${expression} 2) [] and.operator The EL provides and [] two operators to access the data. Some special characters are included in the property names to be accessed, such as. Be sure to use [] if it is not a sign of letters or Numbers. Such as: ${user. My-name} should be changed to ${user [ my-name ]} If you want to dynamically evaluate it, you can do it [], and you cant do it dynamically. Such as: Data is a variable in the ${sessionscop.user [data]} 3) variable EL access variable data is simple, for example: ${username}. It means to take the name of a range The username of the variables. Because we didnt specify which range of username, it would be in order from Page, Request, Session, The Application scope of search. If you find the username on the way, you go back and go, but if you dont find the whole range, It returns null. The name of the property scope in EL Page PageScope Request RequestScope Session SessionScope Application ApplicationScope 4) 1 -- the EL expression is represented by ${}, which can be used in all HTML and JSP tags to replace the complex JAVA code in the JSP page. 2 -- EL expressions can manipulate constant variables and implicit objects. Most commonly used Implicit objects have ${param} and ${paramValues}. ${param} indicates the value of a single string in the request parameter The value. The pageScope represents the variable in the page scope. RequestScope represents the variable for the request object. SessionScope said session Scoped variables. ApplicationScope represents variables that apply scoped. 3 - % @page isELIgnored = true % TRUE, which indicates whether to disable EL language, TRUE is forbidden. FALSE can not help Check the default enabled EL language in JSP2.0. 4 -- the EL language can display logical expressions like ${true and false} and the result is false The relationship expression is ${5 6} ju
显示全部
相似文档