【问题标题】:fn JSTL not supportedfn JSTL 不支持
【发布时间】:2011-07-25 05:30:02
【问题描述】:

当我使用${fn:contains()}" 时会导致以下异常:

org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported

我该如何解决这个异常?

如果我需要下载更新版本的 jstl.jar 和 standard.jar,谁能给我发个链接?

提前致谢。

【问题讨论】:

    标签: java jstl appfuse


    【解决方案1】:

    我猜你正在尝试将此表达式用作某些 JSTL 标记的属性:

    <c:if test = "${fn:contains()}">...</c:if>
    

    如果是这样,请确保您导入了 1.1 版的 JSTL 标签库(注意 URI - 它应该包含 jsp):

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

    【讨论】:

    • 感谢 axtavt,是的,我在 &lt;c:forEach 中使用了 &lt;c:if test = "${fn:contains()}"&gt;...&lt;/c:if&gt;。有没有其他方法可以实现fn:contains() 的相同功能
    • @Ali:你检查过 taglib 声明吗?
    • 是的,我将其更改为&lt;%@ taglib prefix = "c" uri ="http://java.sun.com/jsp/jstl/core" %&gt;,异常已解决但表单未正确绑定。有什么建议 ?非常感谢您的帮助
    【解决方案2】:

    你还需要函数标签库声明。

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

    【讨论】:

      【解决方案3】:

      试试axtavt的回答,如果还是不行,在jsp的顶部添加&lt;%@ page isELIgnored ="false" %&gt;

      【讨论】:

        猜你喜欢
        • 2015-07-03
        • 1970-01-01
        • 2011-07-22
        • 2018-01-21
        • 1970-01-01
        • 2012-01-05
        • 2020-07-13
        • 2015-02-19
        • 2017-08-04
        相关资源
        最近更新 更多