Taglib, Spring Taglib - Tuong-Nguyen/Spring GitHub Wiki
Overview
The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful JSP tags which encapsulates the core functionality common to many JSP applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. It also provides a framework for integrating the existing custom tags with the JSTL tags.
Click here to more about taglib.
Install taglib libraries:
To install to your project you can use the maven dependecy config or dowload a taglib.jar file and paste to webapps\ROOT\WEB-INF\lib directory.
Declaring taglib
Syntax:
< %@ taglib prefix="tagname" uri="tag url" %>
With:
1. `prefix` is tag name, anyname you wanna use
2. `uri` is link to library of taglib
EX:
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
Using taglib
Syntax:
<tagname:tag propperties></tagname:tag>
With:
1. `tagname` is name of taglib is declared above.
2. `tag` is tag or method which is supported by taglib.
EX:
<form:form method="post" action="${urlLogin}" modelAttribute="account">