I have some question about include tags.
Is it correct to use structure like?
<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>
Sometimes I have an exception "JasperException: Unable to compile class for JSP". Is my problem will be solved if I use <%@ include file tag? Or do I need to give up such a structure? All included pages have fixed structure, not dynamic.
The structure could be simplified but it won't resolve your compilation problems.
Instead delegate this logic to controller (using MVC) to decide which view should be returned and properly initialize the view.