JSTL tutorial examples
jstl tutorial examples is designed for beginners and professionals. JSTL stands for JSP Standard Tag Library and JSTL represents a set predefined tags.
The main purpose of JSTL is to simplify the JSP development. JSTL is not language like JSP it’s a tag library by which we can write java program in JSP like for loop , if else statement etc.
Advantage of JSTL
- Fast development.
- Easy understandable for Humans.
- No need to use scriptlet tag in JSP page.
How to use JSTL in JSP
JSTL is developed by java people as part of the JEE API. But to use JSTL in our JSP pages, we need to download the JSTL jars and we need to add jar into WEB-INF/lib directory.
JSTL has some JSTL Core Tags and JSTL Functions. Before writing any JSTL Core tag or JSTL function into JSP page we need to add tag library into JSP page Header section.
JSTL Core Tags library
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
JSTL Functions Tag library
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>