What Is JSTL Core Library?

This section describes the JSTL Core library, represented by http://java.sun.com/jsp/jstl/core in JSTL 1.2.

What Is JSTL Core Library? JSTL Core Library is the main library of JSTL (JSP Standard Tag Libraries). JSTL Core library is defined with the following URIs:

http://java.sun.com/jsp/jstl/core - JSTL 1.2
http://java.sun.com/jsp/jstl/core - JSTL 1.1
http://java.sun.com/jstl/core - JSTL 1.0

If you want to use any tags defined in the JSTL core library, you need to declare an XML namespace using the URI listed above:

<!-- Default JSP Page format -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!-- XML JSP Document format -->
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" ...> 

JSTL Core provides the following basic tags (also called actions):

<c:out value="..."/>
<c:set var="..." value="..."/>
<c:if test="...">body</c:if>
<c:choose>body</c:choose>
<c:forEach items="...">body</c:forEach>
<c:forTokens items="..." delims="...">body</c:forTokens>

Last update: 2012.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 7 Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

JSTL Core Library

What Is JSTL Core Library?

 c:out Action Tag

 c:out Action Tag with EL Expressions

 c:set Action Tag

 c:if Action Tag

 c:choose Action Tag

 c:forEach Action Tag

 c:forTokens Action Tag

 Example - Dumping EL Implicit Objects

 Example - Calculating Prime Numbers

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Outdated Tutorials

 References

 PDF Printing Version