我有这个带有一些条件的jsp页面:
<%
if (filterPresent.equals("true") && !selectedFilterCategory.isEmpty()){
%>
<c:if test="${entry.category eq param.selectedFilterCategory}">
<%
}
%>
RENDER A TABLE WITH ITEMS
<%
if ( filterPresent.equals("true") && !selectedFilterCategory.isEmpty() ) {
%>
</c:if>
<%
}
%>
如果该 filterPresent 值为 true,我只想显示一些项目(与类别匹配的项目)。如果它不存在,我想显示所有项目。
我得到的错误是:
An error occurred at line: 48 in the jsp file: /jsp//ejbChildRule.jsp
Syntax error, insert "while ( Expression ) ;" to complete BlockStatements
45: %>
46: <c:if test="${entry.category eq param.selectedFilterCategory}">
47: <%
48: }
49: %>
50: <tr class="<%=currentBackground%>">
51: <td class="<%=currentBackground%>" align="left" valign="middle" nowrap>
我能以这种方式实现我想要的吗?