JSTL is a standard set of tags used for implementing common tasks in Java Server Pages. It’s probably best to prefer the JSTL over other tag libraries, if possible, since the average web programmer can be expected to be familiar with it.

To give an example of typical JSTL syntax, here are some JSP snippets which use the core, format, and function parts of JSTL:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
...

 

${index.count}${restaurant.name}${restaurant.location}${restaurant.price}${restaurant.comment}

...

System Properties (${fn:length(systemProperties)})

${entry.key} = ${entry.value}

Copyright