This Function returns the subset of Substring.
This program is a demo that how to execute the <fn:substring> in JSTL. First instance we call the syntax library for accessing the JSTL properly. This Function will return the subset value of a string. Here we declare variable for containing the value in as per condition then after we declare the syntax of function that will represent the output on a web browser so on at the end we close all the custom tags
fn:substring.jsp
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c” %>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/functions” prefix=”fn” %>
<html>
<head>
<title><fn:substring> In JSTL</title>
</head>
<body>
<center><h3>Example of Substring In JSTL</h3></center>
<br /><b><center><c:out value=”${fn:substring(‘Java Server Pages’,7,10)}”></c:out>
</body>
</html>