Reputation: 27536
Is it possible to inherit taglibs or imports from parent JSPs in their "descendants"?
Let me show you an example
header.jsp
<%@ page contentType="text/html" isELIgnored="false"
import="org.something.utils.Constants"%>
//some code, Constants class is available here
index.jsp
<jsp:include page="template/header.jsp" />
//Constants is not available, I get a JasperException: Unable to compile class for JSP
also the taglibs inheritance doesn't seem to work. So is there a way how to make this work?
Upvotes: 0
Views: 1186
Reputation: 1969
Taglibs and imports are not inherited, and everything in a tag as well cannot be inherited or passed through pages (except for JspContext and request attributes).
You have two options here:
Edit Defining JSP implicit includes:
Upvotes: 1