Source Code : Using the JSTL functions

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Using the JSTL functions

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head><title>Using the JSTL functions</title></head>
<body>
<h2>Using various JSTL 1.1 functions</h2>

<c:set var="tempStr" value="I love Java an www.java2s.com"/>

The length of the test String: ${fn:length(tempStr)}<br />

Does the test String contain "test"? ${fn:contains(tempStr,"test")}<br />

Putting the String into upper case using fn:toUpperCase(): ${fn:toUpperCase(tempStr)}<br />

Splitting the String into a String array using fn:split(), and returning the array length: ${fn:length(fn:split(tempStr," "))}<br />

</body>
</html>



           
       

Thank with us