jsp - How to use the JSTL "if" tag without getting "..attribute test does not accept any expressions" -
this question has answer here:
how make following code work?
<c:if test="${null != searchresults}" > <c:foreach items="${searchresults}" var="result" varstatus="status">
i've tried many different variations of this, such as:
<c:if test="${searchwasperformed}" >
or
<c:if test="<%=request.getattribute("searchwasperformed") %>" >
and even
<% boolean b = null != request.getattribute("searchresults"); %> <c:if test="${b}" >
which looks ugly :/ keep on getting the
org.apache.jasper.jasperexception: /web-inf/jsp/admin/admin-index.jsp(29,2) pwc6236: according tld or attribute directive in tag file, attribute test not accept expressions
how go around this?
check version of jstl taglib use. should 1.1, should have (note uri):
<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
Comments
Post a Comment