JSTL tag Library (I) Core tag library and jstl tag library CORE

Source: Internet
Author: User

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>
 

  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.