fn:indexOf(s1, s2)
<%@ 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>c:choose, c:when and c:otherwise Tag Example</title>
</head>
<body>
<c:set var="s1" value="Jobs with"/>
<c:set var="s2" value="a"/>
<c:choose>
<c:when test="${fn:indexOf(s1, s2) == -1}">
<p>not there</p>
</c:when>
<c:otherwise>
<p>yes</p>
</c:otherwise>
</c:choose>
</body>
</html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head>
<title>c:choose, c:when and c:otherwise Tag Example</title>
</head>
<body>
<c:set var="s1" value="Jobs with"/>
<c:set var="s2" value="a"/>
<c:choose>
<c:when test="${fn:indexOf(s1, s2) == -1}">
<p>not there</p>
</c:when>
<c:otherwise>
<p>yes</p>
</c:otherwise>
</c:choose>
</body>
</html>
fn:contains(s1, s2)
<%@ 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>c:choose, c:when and c:otherwise Tag Example</title>
</head>
<body>
<c:set var="s1" value="Jobs with"/>
<c:set var="s2" value="w"/>
<c:choose>
<c:when test="${fn:contains(s1, s2)}">
<p>yes</p>
</c:when>
<c:otherwise>
<p>no</p>
</c:otherwise>
</c:choose>
</body>
</html>