Reputation: 591
<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>
In this code am getting unknown tag warning.I have included jstl jar files in WEB-INF/lib directory.Because highlighted block of code only shows this warning.I can't find my mistake.please help.
Upvotes: 1
Views: 379
Reputation: 2070
The JSTL core tag library is not included in your jspf. Add
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
in your header jspf.
Upvotes: 1