JSTL jars JSTL jars are container specific, for example in Tomcat, we need to include standard.jar and jstl.jar. Download the files, paste them into WEB-INF/lib and add it to the build path for the project. jstl-1.2.jar and standard-1.0.2.jar work great with Tomcat 7. JSTL Tags ———— Based on the JSTL functions, they are categorized into five types. 1. JSTL Core Tags: JSTL Core tags provide support for iteration, conditional logic, catch exception, url, forward or redirect response etc. To use JSTL core tags, we should include it in the JSP page like below. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 2. JSTL Formatting and Localization Tags: JSTL Formatting tags are provided for formatting of Numbers, Dates and i18n support through locales and resource bundles. We can include these jstl tags in JSP with below syntax: <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 3. JSTL SQL Tags: JSTL SQL Tags provide support for interaction with relational databases such as Oracle, MySql etc. Using JSTL SQL tags we can run database queries, we include these JSTL tags in JSP with below syntax: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> 4. JSTL XML Tags: JSTL XML tags are used to work with XML documents such as parsing XML, transforming XML data and XPath expressions evaluation. Syntax to include JSTL XML tags in JSP page is: <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> 5. JSTL Functions Tags: JSTL tags provide a number of functions that we can use to perform common operation, most of them are for String manipulation such as String Concatenation, Split String etc. Syntax to include JSTL functions in JSP page is: <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> Note that all the JSTL standard tags URI starts with http://java.sun.com/jsp/jstl/ and we can use any prefix we want but it’s best practice to use the prefix defined above because everybody uses them, so it will not create any confusion. JSTL Core Tags are listed in the below table. To write something in JSP page, we can use EL also with this tag Same as or include directive redirect request to another resource To set the variable value in given scope. To remove the variable from given scope To catch the exception and wrap it into an object. Simple conditional logic, used with EL and we can use it to process the exception from Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by and Subtag of that includes its body if its condition evalutes to ‘true’. Subtag of that includes its body if its condition evalutes to ‘false’. for iteration over a collection for iteration over tokens separated by a delimiter. used with to pass parameters to create a URL with optional query string parameters