JavaServer Pages Standard Tag Library
lastmod 2022-08-18created 2014-03-187 edits
The JavaServer Pages Standard Tag Library (abbreviated JSTL) is a collection of components for the Java EE-based web application development platform.
About
- JSTL is the JSP standard library (JSP Standard Tag Library).
- It is a collection of custom tag libraries that implement features often used in JSP (iteration and conditionals, data management and formatting, XML manipulation, database access).
- It lets you separate business logic from presentation logic in tasks such as formatting times, dates, and numbers or processing strings.
- JSTL is expressed using EL (Expression Language).
Usage
<!-- 선언부 -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!-- 사용-->
<c:set var="hello" value="Hello" />
${hello}
Favorite site
- Wikipedia (en) article on JSTL
- Understanding and practicing JSTL
- JSTL syntax and usage
- [Recommended] How to Reference and Use JSTL in your Web Application 1
- Using the Java Tag Library (JSTL) 2