tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r469842 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
Date Wed, 01 Nov 2006 10:04:22 GMT
Author: remm
Date: Wed Nov  1 02:04:21 2006
New Revision: 469842

URL: http://svn.apache.org/viewvc?view=rev&rev=469842
Log:
- Always call jspInit (some work in always done there, now).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?view=diff&rev=469842&r1=469841&r2=469842
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Wed Nov  1 02:04:21
2006
@@ -391,8 +391,7 @@
         if (isPoolingEnabled) {
             for (int i = 0; i < tagHandlerPoolNames.size(); i++) {
                 out.printin(tagHandlerPoolNames.elementAt(i));
-                out
-                        .print(" = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(");
+                out.print(" = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(");
                 if (ctxt.isTagFile()) {
                     out.print("config");
                 } else {
@@ -562,8 +561,7 @@
         out.print(servletClassName);
         out.print(" extends ");
         out.println(pageInfo.getExtends());
-        out
-                .printin("    implements org.apache.jasper.runtime.JspSourceDependent");
+        out.printin("    implements org.apache.jasper.runtime.JspSourceDependent");
         if (!pageInfo.isThreadSafe()) {
             out.println(",");
             out.printin("                 SingleThreadModel");
@@ -589,8 +587,7 @@
         // Now the service method
         out.printin("public void ");
         out.print(serviceMethodName);
-        out
-                .println("(HttpServletRequest request, HttpServletResponse response)");
+        out.println("(HttpServletRequest request, HttpServletResponse response)");
         out.println("        throws java.io.IOException, ServletException {");
 
         out.pushIndent();
@@ -604,12 +601,10 @@
             out.printil("HttpSession session = null;");
 
         if (pageInfo.isErrorPage()) {
-            out
-                    .printil("Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);");
+            out.printil("Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);");
             out.printil("if (exception != null) {");
             out.pushIndent();
-            out
-                    .printil("response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);");
+            out.printil("response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);");
             out.popIndent();
             out.printil("}");
         }
@@ -3428,12 +3423,10 @@
         out.printin("public final class ");
         out.println(className);
         out.printil("    extends javax.servlet.jsp.tagext.SimpleTagSupport");
-        out
-                .printin("    implements org.apache.jasper.runtime.JspSourceDependent");
+        out.printin("    implements org.apache.jasper.runtime.JspSourceDependent");
         if (tagInfo.hasDynamicAttributes()) {
             out.println(",");
-            out
-                    .printin("               javax.servlet.jsp.tagext.DynamicAttributes");
+            out.printin("               javax.servlet.jsp.tagext.DynamicAttributes");
         }
         out.println(" {");
         out.println();
@@ -3442,7 +3435,6 @@
         /*
          * Class body begins here
          */
-
         generateDeclarations(tag);
 
         // Static initializations here
@@ -3468,8 +3460,7 @@
         genPreambleMethods();
 
         // Now the doTag() method
-        out
-                .printil("public void doTag() throws JspException, java.io.IOException {");
+        out.printil("public void doTag() throws JspException, java.io.IOException {");
 
         if (ctxt.isPrototypeMode()) {
             out.printil("}");
@@ -3485,23 +3476,18 @@
          * implicit object in tag files. Declare _jspx_page_context, so we can
          * share the code generator with JSPs.
          */
-        out
-                .printil("PageContext _jspx_page_context = (PageContext)jspContext;");
-
+        out.printil("PageContext _jspx_page_context = (PageContext)jspContext;");
+        
         // Declare implicit objects.
         out.printil("HttpServletRequest request = "
                 + "(HttpServletRequest) _jspx_page_context.getRequest();");
         out.printil("HttpServletResponse response = "
                 + "(HttpServletResponse) _jspx_page_context.getResponse();");
         out.printil("HttpSession session = _jspx_page_context.getSession();");
-        out
-                .printil("ServletContext application = _jspx_page_context.getServletContext();");
-        out
-                .printil("ServletConfig config = _jspx_page_context.getServletConfig();");
+        out.printil("ServletContext application = _jspx_page_context.getServletContext();");
+        out.printil("ServletConfig config = _jspx_page_context.getServletConfig();");
         out.printil("JspWriter out = jspContext.getOut();");
-        if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) {
-            out.printil("_jspInit(config);");
-        }
+        out.printil("_jspInit(config);");
         
         // set current JspContext on ELContext
         out.printil("jspContext.getELContext().putContext(JspContext.class,jspContext);");
@@ -3764,7 +3750,7 @@
                 
                 // we need to scope the modified VariableMapper for consistency and performance
                 if (!variableMapperVar) {
-                    out.println("javax.el.VariableMapper _el_variablemapper = jspContext.getELContext().getVariableMapper();");
+                    out.printil("javax.el.VariableMapper _el_variablemapper = jspContext.getELContext().getVariableMapper();");
                     variableMapperVar = true;
                 }
                 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message