This Function use to join all the array elements into String.

This function <fn:join> will join the array elements into a string. First we call the syntax library for accessing the JSTL. Then we declare the variables for storing the value that contained by variable. After in the body section we declare the function syntax that will use to execute while compiling and will present the output on the web browser.


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

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



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



          <c:set var="str1" value="Java Server pages."/>

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

          <c:set var="str3" value="${fn:join(str2, '-')}" />

          <br /><b><center><p>Real String : ${str3}</p>



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