This Function return the sub set that is following the String.

  This Program is a demo of <fn:substringAfter> In jstl this function will use to return the sub set of string that is been followed on a specific string. 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

fn:substringAfter.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:substringAfter&gt; IN JSTL</title>

  </head>

   <body>

         <center><h3>Example of Substring After In JSTL</h3></center>

         <c:set var="str1" value="Welcome to Java server pages."/>

         <c:set var="str2" value="${fn:substringAfter(str1,'to')}" />

         <p><b><center><p>Real Sub String -: ${str2}</p>

   </body>

</html>

       JSTL fn:substringAfter() 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.