el: 在jsp页面内使用函数判断子字符串

e.g.

<c:forEach items="${datas}" var="data">
    <c:if test="${not fn:containsIgnoreCase(data, 'apple')}">
        <p>Doesn't contain 'apple'</p>
    </c:if>
</c:forEach>

使用el标签,在jsp页面需要声明:

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

  

原文地址:https://www.cnblogs.com/ChewApple/p/5120584.html