This Function tests the Input String starts with the given suffix or not.

This Program is a demo of Function <fn:startsWith> in JSTL. This function use to test that the input string starts from the given suffix or not. As per condition then we declare the syntax library of JSTL that will allow to access the JSTL functioning. Then after we declare variable and the syntax of function that will be execute and present the output on the web browser. In the end we close all the html tags.


      <%@ taglib uri="" prefix="c" %> 

<%@ taglib uri="" prefix="fn" %> 



       <title>&lt;fn:endsWith&gt; In JSTL</title> 



         <c:set var="str" value="Welcome to the World of JSP"/> 

         <c:if test="${fn:endsWith(str, 'JSP')}"> 

               <b><center><br /><p>String Ends with JSP<p> 




       JSTL fn:endsWith() Function

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular 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.