使用IDEA开发JSP不支持EL表达式的解决办法

问题:

最近代码中使用了el表达式,一直报以下错误。

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

解决方案:

方法一:使用 RT 库,RT库是依赖于JSP传统的请求时属性值

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ page isELIgnored="false" %>

方法二:依赖于EL实现

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

注意:以下这个库是不支持EL表达式的,我们在导入相关库的时候要注意。

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

发表评论

电子邮件地址不会被公开。 必填项已用*标注