我對包含標籤有一些疑問。JSP上包含多個標籤
使用像?
<c:choose>
<c:when test="${info == 'view_users'}">
<jsp:include page="/WEB-INF/jsp/admin/view_users.jsp" />
</c:when>
<c:when test="${info == 'view_products'}">
<jsp:include page="/WEB-INF/jsp/admin/view_products.jsp" />
</c:when>
<c:when test="${info == 'edit_product'}">
<jsp:include page="/WEB-INF/jsp/admin/edit_product.jsp" />
</c:when>
<c:when test="${info == 'view_categories'}">
<jsp:include page="/WEB-INF/jsp/admin/view_categories.jsp" />
</c:when>
</c:choose>
有時候我有個例外"JasperException: Unable to compile class for JSP"
。如果我使用<%@ include
文件標籤,我的問題是否會得到解決?還是我需要放棄這樣的結構?所有包含的頁面都有固定的結構,不是動態的
請發佈編譯錯誤。 –