--- java/org/apache/jasper/compiler/Generator.java (revision 1100181) +++ java/org/apache/jasper/compiler/Generator.java (working copy) @@ -78,6 +78,12 @@ private static final String VAR_ANNOTATIONPROCESSOR = System.getProperty("org.apache.jasper.compiler.Generator.VAR_ANNOTATIONPROCESSOR", "_jsp_annotationprocessor"); + /* System property that makes it possible for jsp pages with the extends + * page directive to take advantage of tag pooling. + */ + private static final boolean ENABLEPOOLINGFORJSPSUBCLASSES = Boolean.valueOf( + System.getProperty("org.apache.jasper.compiler.Generator.ENABLEPOOLINGFORJSPSUBCLASSES", "false")); + /* System property that controls if the requirement to have the object * used in jsp:getProperty action to be previously "introduced" * to the JSP processor (see JSP.5.3) is enforced. @@ -3390,7 +3396,7 @@ * clarify whether containers can override init() and destroy(). For * now, we just disable tag pooling for pages that use "extends". */ - if (pageInfo.getExtends(false) == null) { + if (pageInfo.getExtends(false) == null || ENABLEPOOLINGFORJSPSUBCLASSES) { isPoolingEnabled = ctxt.getOptions().isPoolingEnabled(); } else { isPoolingEnabled = false;