This Tag is been Only Used To Break string into Tokens and after that to retrieve them each from the tokens..this quite similar as <c: foreach> bt a major difference is b/w both in that the “Token” tag is been use within the “Delims”  to represent characters as delimiters…

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>

<head>

       <title>&lt;c:forTokens&gt;Tag Example In J.S.P</title>

</head>

<body>

        <p><b><br /><center>

        <c:forTokens items="Java,dotNet,Web are the Modern Age Computer Souls" delims="," var="tkns">

                <c:out value="${tkns}"/>

       </c:forTokens>

       < /center></b></p>

       </body>

</html>

                      JSTL Core c forTokens Tag

About Program…..

As per to similar with <c: forEach> the only difference is that it uses “delims” that use to implement characters as “delimeteres”. As declaring all the required tags the body concept creates the function that will allow to get the desired output as the value of condition mentioning in the body section. that will present the value in token as a string type.





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.