El and Jstl Learning (ii)--JSTL technology

Source: Internet
Author: User

1. JSTL Overview

JSTL (JSP standard tag Library), JSP standards tag libraries, can be embedded in the JSP page using the form of tags to complete business logic and other functions.

The purpose of the JSTL is to replace the script code in the JSP page, as is the case with El.

The JSTL standard Tag Library has 5 sub-libraries, but as it develops, its core library is often used today

Tag Library

The URI of the tag library

Prefix

Core

Http://java.sun.com/jsp/jstl/core

C

i18n

Http://java.sun.com/jsp/jstl/fmt

Fmt

Sql

Http://java.sun.com/jsp/jstl/sql

Sql

Xml

Http://java.sun.com/jsp/jstl/xml

X

Functions

Http://java.sun.com/jsp/jstl/functions

Fn

2. Jstl Download and Import

Jstl Download:

Download the Jstl jar package from the Apache website. Go to the "http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/" url to download the JSTL installation package, Jakarta-taglibs-standard-1.1.2.zip.

Then unzip the downloaded JSTL installation package, and at this point, you can see two jar files in the Lib directory, respectively, Jstl.jar and Standard.jar.

Where the Jstl.jar file contains the interfaces and related classes defined in the JSTL specification, the Standard.jar file contains the. class file used to implement JSTL and 5 tag Library descriptor files (TLDs) in Jstl


Import two jar packages into the lib of our project

Import the core tag library using JSP taglib directives

3. Common tags for jstl core libraries

1) <c:if test= "" > Label

Where test is the condition that returns a Boolean

2) <c:forEach> label

There are two combinations of modes of use:

El and Jstl Learning (ii)--JSTL technology

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.