【问题标题】:jstl tags shows unknown tags warningjstl 标签显示未知标签警告
【发布时间】:2014-02-16 11:17:56
【问题描述】:
<div id="header">
        <div>
            <div class="logo">
                <a href="LoginRegister.jsp">Sample Project</a>
            </div>
            <ul id="navigation">
                <li <c:if test="${page eq 'login' }"> class="active" </c:if> >
                    <a href="<%=request.getContextPath()%>LoginRegister.jsp">Home</a>
                </li>
                <li <c:if test="${page eq 'upload' }"> class="active" </c:if> >
                    <a href="<%=request.getContextPath()%>/app/UploadImages.jsp">Upload</a>
                </li>
                <li <c:if test="${page eq 'album' }"> class="active" </c:if> >
                    <a href="<%=request.getContextPath()%>/app/MyAlbum.jsp">My Albums</a>
                </li>
            </ul>
        </div>
        <div class="loggedInInfo">
             **<c:if test="${not empty user}">
                <p>Hello ${user}.</p><b><a href="<%=request.getContextPath()%>/LogoutServlet">Logout</a></b>
            </c:if>
            <c:if test="${empty user}">
                <p>You're not logged in!</p>
            </c:if>**
        </div>
</div>

在这段代码中出现未知标签警告。我已在 WEB-INF/lib 目录中包含 jstl jar 文件。因为突出显示的代码块仅显示此警告。我找不到我的错误。请帮助。

【问题讨论】:

    标签: jakarta-ee jstl


    【解决方案1】:

    JSTL 核心标签库不包含在您的 jspf 中。添加

    &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;

    在您的标题 jspf 中。

    【讨论】:

      猜你喜欢
      • 2018-01-26
      • 1970-01-01
      • 1970-01-01
      • 2014-11-17
      • 2022-12-03
      • 2018-02-24
      • 2016-03-05
      • 2021-02-23
      • 1970-01-01
      相关资源
      最近更新 更多