You are here:   HomeJava Server PagesJava Standard Tag Lib (JSTL)JSTL fn:length() Function

              This Function Use to Count the Length of String or number of Characters in a String.

In This program we just execute the implementation of <fn:length> as we declare the library syntax of JSTL. Then after in Body section we declare two variables that will contain the stored value. Both variable contain the string value in next step we use length function in the output on web browser it will precise the value of character as length of String.

fn:Length.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>&lt;fn:Length&gt; In JSTL</title>

</head>

 <body>

      <c:set var="str1" value="Welcome To The World Of Java Server Pages."/>

      <c:set var="str2" value="This is Example of JSTL Function." />

      <br /><center><b><p>Length of First String : ${fn:length(str1)}</p>

      <b><center><p>Length of Second String : ${fn:length(str2)}</p>

 </body>

</html>

        JSTL fn:length() Function





Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Search Content







Advance Courses



Basic Courses



Advertise with Us