JSTL contains a number of functions that take Unified Expression Language expressions as parameters. All JSTL functions except one are used exclusively for
String manipulation. An exception is the
, which can take a
Collection, or array as a parameter. It returns the length of the
String, the size of the
Collection, or the length of the array, depending on what parameter is passed to it. The following JSP illustrates the use of JSTL functions:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 ...