Refine search
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations() { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations() { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private volatile javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private volatile org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations() { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations(String className) throws JasperException { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations() { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private volatile javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private volatile org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations() { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
/** * Declare tag handler pools (tags of the same type and with the same * attribute set share the same tag handler pool) (shared by servlet and tag * handler preamble generation) * * In JSP 2.1, we also scope an instance of ExpressionFactory */ private void genPreambleClassVariableDeclarations(String className) throws JasperException { if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printil("private org.apache.jasper.runtime.TagHandlerPool " + tagHandlerPoolNames.elementAt(i) + ";"); } out.println(); } out.printin("private javax.el.ExpressionFactory "); out.print(VAR_EXPRESSIONFACTORY); out.println(";"); out.printin("private org.apache.tomcat.InstanceManager "); out.print(VAR_INSTANCEMANAGER); out.println(";"); out.println(); }
private void writeNewInstance(String tagHandlerVar, String tagHandlerClassName) { out.printin(tagHandlerClassName); out.print(" "); out.print(tagHandlerVar); out.print(" = "); if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) { out.print("("); out.print(tagHandlerClassName); out.print(")"); out.print("_jsp_getInstanceManager().newInstance(\""); out.print(tagHandlerClassName); out.println("\", this.getClass().getClassLoader());"); } else { out.print("new "); out.print(tagHandlerClassName); out.println("();"); out.printin("_jsp_getInstanceManager().newInstance("); out.print(tagHandlerVar); out.println(");"); } }
/** * Generation of static initializers in preamble. For example, dependent * list, el function map, prefix map. (shared by servlet and tag handler * preamble generation) */ private void genPreambleStaticInitializers() { out.printil("private static final javax.servlet.jsp.JspFactory _jspxFactory ="); out.printil(" javax.servlet.jsp.JspFactory.getDefaultFactory();"); out.println(); // Static data for getDependants() out.printil("private static java.util.List<java.lang.String> _jspx_dependants;"); out.println(); List<String> dependants = pageInfo.getDependants(); Iterator<String> iter = dependants.iterator(); if (!dependants.isEmpty()) { out.printil("static {"); out.pushIndent(); out.printin("_jspx_dependants = new java.util.ArrayList<java.lang.String>("); out.print("" + dependants.size()); out.println(");"); while (iter.hasNext()) { out.printin("_jspx_dependants.add(\""); out.print(iter.next()); out.println("\");"); } out.popIndent(); out.printil("}"); out.println(); } }
/** * Generation of static initializers in preamble. For example, dependant * list, el function map, prefix map. (shared by servlet and tag handler * preamble generation) */ private void genPreambleStaticInitializers() throws JasperException { out.printil("private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();"); out.println(); // Static data for getDependants() out.printil("private static java.util.List _jspx_dependants;"); out.println(); List dependants = pageInfo.getDependants(); Iterator iter = dependants.iterator(); if (!dependants.isEmpty()) { out.printil("static {"); out.pushIndent(); out.printin("_jspx_dependants = new java.util.ArrayList("); out.print("" + dependants.size()); out.println(");"); while (iter.hasNext()) { out.printin("_jspx_dependants.add(\""); out.print((String) iter.next()); out.println("\");"); } out.popIndent(); out.printil("}"); out.println(); } }
private void writeNewInstance(String tagHandlerVar, String tagHandlerClassName) { out.printin(tagHandlerClassName); out.print(" "); out.print(tagHandlerVar); out.print(" = "); if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) { out.print("("); out.print(tagHandlerClassName); out.print(")"); out.print("_jsp_getInstanceManager().newInstance(\""); out.print(tagHandlerClassName); out.println("\", this.getClass().getClassLoader());"); } else { out.print("new "); out.print(tagHandlerClassName); out.println("();"); out.printin("_jsp_getInstanceManager().newInstance("); out.print(tagHandlerVar); out.println(");"); } }
/** * Generation of static initializers in preamble. For example, dependant * list, el function map, prefix map. (shared by servlet and tag handler * preamble generation) */ private void genPreambleStaticInitializers() throws JasperException { out.printil("private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();"); out.println(); // Static data for getDependants() out.printil("private static java.util.List _jspx_dependants;"); out.println(); List dependants = pageInfo.getDependants(); Iterator iter = dependants.iterator(); if (!dependants.isEmpty()) { out.printil("static {"); out.pushIndent(); out.printin("_jspx_dependants = new java.util.ArrayList("); out.print("" + dependants.size()); out.println(");"); while (iter.hasNext()) { out.printin("_jspx_dependants.add(\""); out.print((String) iter.next()); out.println("\");"); } out.popIndent(); out.printil("}"); out.println(); } }