This Function tests the Input String starts with the given prefix 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 prefix 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:startsWith&gt; In JSTL</title> 



        <c:set var="str" value="Java Server Pages known as JSP "/> 

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

              <b><center><br /><p>String Starts with Java<p> 




       JSTL fn:startsWith() Function

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, 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.