This Function removes the white Space from both side right and left side.

This Function as mentioned above that the removes white space from both side. This program is a demo of this function.  First we call the syntax library for JSTL Accessing. Then after in body section we declare the variable that contain the stored value and then after declare the function syntax that present the output while execution on the web browser. And in the last we close all the html tags.

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

</head>

  <body>

       <center><h3>Example of Trim Function in JSTL</h3></center>

       <b><center><br /><c:out value="${fn:trim(' JSP ')}"></c:out>

  </body>

</html>

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