Java Series--el and Jstl

Source: Internet
Author: User

One,el expression language

Composition: ${Variable}

Function: can be directly value from the Range object

Default is Requestscope

If the accessed property does not exist, the El return value is null, but displaying an empty string in the JSP page does not display

Where the El expression can appear:

1. HTML tag attribute value <input type= "text" value= "${username}"/>

2, JS script value <input type= "button" onclick= "Checkform (' ${username} ')" value= "point me! "/>

3. Hyperlink <a href= "Login.jsp?username=${username}" > Home </a>

El read JavaBean data ${requestScope.bean.department_id}

El Read list data ${requeestscope.list["0"} or ${requestscope.list[0]}

El Read map data ${requestScope.map.jobid}

El-Expression operators

1. Arithmetic operators

2. Relational operators

3. Logical operators

4. Empty operator

5, two-yuan expression

6, [] and . Operator

Second, jstl:jsp standard tag Library

JSTL1.0 version

JSTL1.1 version

JSTL classification:

1. Core tag

Functionally divided into 4 categories:

1) Expression control tag: Out,set,remove,catch

2) Process Control Label: if,choose,when,otherwise

3) Cycle Label:

2. Internationalization label

3. Database tag (not supported)

4. XML tags

5. Jstl function

Java Series--el and Jstl

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.