1. What is jstl?
Jstl is an open-source JSP tag library that is constantly improved and maintained by Apache's Jakarta team. Jstl can only run on containers that support jsp1.2 and servlet2.3 specifications, such as Tomcat 4.x. However, JSP 2.0 will be supported as a standard.
The latest version of jstl is 1.02 and the final version is 1.0. Jstl consists of two parts: the tag library and El (Expression Language) language.
Before starting, we need to figure out how to run jstl. Because jstl is Based on JSP technology, we need a container that can compile JSP to run it. Here we use the free JSP Container Tomcat
Ii. Main Functions of jstlJstl is an open-source JSP tag library that is constantly being developed and improved. It supports multiple tags. The following four tags are commonly used in development: four common labels in jstl
Tag |
URL |
Default prefix |
Main functions |
Core tag |
Http://java.sun.com/jstl/core |
C |
Support Common JSP operations |
Database Access (SQL) Label |
Http://java.sun.com/jstl/ SQL |
SQL |
Support JSP operations on databases |
I18n capable formatting tag |
Http://java.sun.com/jstl/fmt |
FMT |
Supports internationalization of JSP pages |
XML processing label |
Http://java.sun.com/jstl/xml |
X |
Support JSP processing of XML documents |
The jstl tag library is very powerful. This article only describes how to use some of the most common labels.
3. Configure jstlIt includes two jar files: jstl. jar and standard. jar. There is no need to care about anything, focusing on applications. Original Article introduction: <% @ taglib prefix = "C" uri = "http://java.sun.com/jsp/jstl/core" %> <% @ taglib prefix = "SQL" uri = "http://java.sun.com/jsp/jstl/ SQL" %> <% @ taglib prefix = "FMT "uri =" http://java.sun.com/jsp/jstl/fmt "%> where, prefix is the prefix, in order to distinguish the same labels in other packages.
4. How to disable
----- Configuring servlet in this way can disable the script language. -----