<html>
<head>
<title>Example fn:split and fn:join tag of JSTL</title>
</head>
<body>
<c:set var="str1" value="This is first string"/>
<c:set var="str2" value="This|is|second|string"/>
<c:set var="str3" value="This|is+third*string"/>
<h4>tag fn:split(Here we will split the given string in
to array of string on the <br>basis of given delimeter)</h4>
<table width="50%" border="1">
<tr>
<th>Input String</th>
<th>Delimiter(s)</th>
<th>After split</th>
</tr>
<tr>
<td>${str1}</td>
<td>white space</td>
<td>
<c:forEach var="num" items="${fn:split(str1, ' ')}">
<c:out value="${num}" />
</c:forEach>
</td>
</tr>