1. How to access implicit object through El
El can be used in two locations:
A. template text
B. attribute settings for standard and custom tags
Implicit object
Related to the value range: applicationscope, sessionscope, requestscope, pagescope
Related to input and output: Param, paramvalues
Header and headervalues
Related to cookies: cookies
It is related to the initial parameter of servletcontext: initparam
There is also a pagecontext
2. El access Operators
Property operation symbol:. or []
Operator symbol of the set: []
If the attribute to be accessed contains non-letters, you must use []
3. Other El operation symbols
A. arithmetic: +,-(Binary), *,/(DIV), % (MOD)
B. Logic: & (and), | (OR ),! (Not)
C. Relational: = (EQ ),! = (NE), <(LT),> (GT), <= (LE),> = (GE)
D. Empty: used to determine whether it is null or empty
E. Conditional :?
4. El Functions
A. How to Use El Functions
$ {Prefix: functionname (args0 ,...)}
B. How to define a function
The function must be defined as a public static method, and the class access modifier is also public
Package william m;
Public class myfunction {
Public static Boolean equals (string str1, string str2 ){
Return str1.equals (str2 );
}
}
C. Configure Descriptor
<Function>
<Name> equals </Name>
<Function-class> William M. myfunction </function-class>
<Function-signature> Boolean equals (Java. Lang. String, java. Lang. String) </function-signature>
</Function>