① EL keyword list
Div-division (/) mod-remainder (%) eq-equal to (=) ne-not equal (! =)
Lt-less than (<) gt-greater than (>) le-less than or equal to (<=) ge-greater than or equal to (> =)
And-logical and (&) or-logical or (|) not-logical non (!) True-logical truth
False-logical false null-null instanceof-empty-null test operator
② EL built-in object
----------------------------------------------------
Implicit object type description
----------------------------------------------------
PageContext java. util. Map indicates the PageContext object of the JSP.
Pagination java. util. Map obtains the value corresponding to the attribute name of the Page sharing range.
RequestScope java. util. Map gets the value corresponding to the attribute name of the Request sharing range.
SessionScope java. util. Map gets the value corresponding to the attribute name of the session sharing range.
ApplicationScope java. util. Map gets the value corresponding to the attribute name of the application sharing range.
The param java. util. Map function is the same as the request. getParameter () method.
ParamValue java. util. Map function is the same as request. getParameterValues () method
The header java. util. Map function is the same as the request. getHeader () method.
The heraderValues java. util. Map function is the same as the request. getHeaders () method.
Cookie java. util. Map function is the same as request. getCookies () method
The initParam java. util. Map function is the same as the application. getInitParameter () method.
----------------------------------------------------------
③ EL Operator
[].
()
-! Empty
*/%
+-
<> <=> =
=! =
&&
|
$ {? B: C}
④ User-defined functions in EL
1. Write a function definition. The function declaration must be static in the class.
Package elfunction;
Public class functions {
Public static String toUpper (String value ){
Return value. toUpperCase ();
}
}
2. Write the TLD file of the custom function and place it in the <taglib> label.
<Function>
<Name> toUpper </name>
<Function-class> elfunction. functions </function-class>
<Function-signature>
Java. lang. String toUpper (java. lang. String)
</Function-signature>
<Description> A to Upper function. </description>
</Function>
3. Introduce the tag definition file in web. xml.
<Taglib>
<Taglib-uri>/WEB-INF/tlds/elfunction. tld </taglib-uri>
<Taglib-location>/WEB-INF/tlds/elfunction. tld </taglib-location>
</Taglib>
4. Introduce udfs in the form of custom tags on the page
<% @ Taglib uri = "/WEB-INF/tlds/elfunction. tld" prefix = "ELFun" %>
$ {ELFun: toUpper ("abcdefg ")}