Js
①el keyword List
div -except (/) mod -Take (%) eq -equals (= =) ne -Not equal to (!=)
lt -less than (<) gt -Greater than (>) le -less than or equal ( <=) ge -greater than or equal to (>=)
and -Logic and (&&) or -Logic or (| |) not-logical non (!) true -Logic True
false-logical false null-null value instanceof- empty-null test operator
②el built-in objects
----------------------------------------------------
Implied object type description
----------------------------------------------------
PageContext Java.util.Map represents the PageContext object for this JSP
Pagescope Java.util.Map Gets the value of the property name of the page share range
Requestscope Java.util.Map Gets the value of the property name for the request shared scope
Sessionscope Java.util.Map Gets the value of the property name of the session shared range
Applicationscope Java.util.Map Gets the value of the property name of the application shared range
param java.util.Map function with Request.getparameter () method
Paramvalue Java.util.Map function with Request.getparametervalues () method
Header Java.util.Map function with Request.getheader () method
Heradervalues Java.util.Map function with Request.getheaders () method
Cookie Java.util.Map function with Request.getcookies () method
Initparam Java.util.Map function with Application.getinitparameter () method
----------------------------------------------------------
③el operator
[] .
()
- ! Empty
* / %
+ -
< > <= >=
== !=
&&
||
${A? B:C}
Custom Functions in ④el
1. Write function definition, function declaration must be static in class
Package elfunction;
public class Functions {
public static string ToUpper (string value) {
return Value.touppercase ();
}
}
2. Write the custom function of the TLD file, placed in the <taglib> tag
<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. Introduction of label definition files 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 custom functions in the form of a custom label on the page
<%@ taglib uri= "/web-inf/tlds/elfunction.tld" prefix= "Elfun"%>
${elfun:toupper ("ABCDEFG")}