天天看点

使用fn表达式与jstl表达式出现异常

今天使用fn:contains方法报According to TLD or attribute directive in tag file, attribute test does not accept异常,怎么看语法都没错,后来在网上发现是由于版本不兼容的原因

只需要将<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

变成      <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

JSTL core库的有两种taglib伪指令, 其中RT库即是依赖于JSP传统的请求时属性值, 而不是依赖于EL来实现(称为EL库.JSP2.0将支持EL)