JSTL tag Library (I) Core tag library and jstl tag library CORE
Core)
1. Expression operation
2. Process Control
3. Iterative operations
4. URL operations
1. Expression operation
Tag |
Syntax |
Function |
Description |
<C: out> |
<C: out value = "<string value>" default = "<string default output value>" EscapeXml = "<true | false>"/> |
Used to display the results of an expression |
① All three attributes can use EL expressions. ② Default is the output when value does not have a value ③ Includes ontology and Ontology ④ If escapeXml is set to true, it is the original output. |
<C: set> |
<C: set var = "<string variable name>" value = "<string value>" Target = "<string object of the attribute to be modified>" Property = "<string attributes to be modified>" scope = "<string variable range>"/> |
Used to save data |
① Variable range default Page Page | request | session | application ② Only values can use EL expressions |
<C: remove> |
<c:remove var="<string>" scope="<string>"/> |
Used to remove data |
2. Process Control
Tag |
Syntax |
Function |
Description |
<C: if> |
<C: if test = "<boolean expression>" var = "<string saved to a real value>" Scope = "<string>"> </c: if> |
Value of the tag judgment Expression If the expression value is true, the body content is executed. |
① Includes ontology and Ontology |
<C: choose> |
<c:choose> <c:when test="<boolean>"/> ... </c:when> <c:when test="<boolean>"/> ... </c:when> ... ... <c:otherwise> ... </c:otherwise></c:choose> |
① <C: choose> as the parent label of <c: when> <c: otherwise> ② <C: otherwise> must be after <c: when> |
<C: when> |
<C: otherwise> |