tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r531683 - /tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java
Date Tue, 24 Apr 2007 02:24:24 GMT
Author: markt
Date: Mon Apr 23 19:24:24 2007
New Revision: 531683

URL: http://svn.apache.org/viewvc?view=rev&rev=531683
Log:
Fix performance issues in the previous patch by using ServletContext.log() for the one log
message this class generates.

Modified:
    tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java

Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java?view=diff&rev=531683&r1=531682&r2=531683
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java Mon Apr
23 19:24:24 2007
@@ -46,8 +46,6 @@
 
 import org.apache.commons.el.ExpressionEvaluatorImpl;
 import org.apache.commons.el.VariableResolverImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jasper.Constants;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.security.SecurityUtil;
@@ -65,9 +63,6 @@
  */
 public class PageContextImpl extends PageContext implements VariableResolver {
 
-    // Logger
-    private Log log;
-
     // The expression evaluator, for evaluating EL expressions.
     private static ExpressionEvaluatorImpl elExprEval
         = new ExpressionEvaluatorImpl(false);
@@ -128,14 +123,13 @@
                              boolean autoFlush) throws IOException {
 
         // initialize state
-        log = LogFactory.getLog(getClass());
-
         this.servlet = servlet;
         this.config = servlet.getServletConfig();
         this.context = config.getServletContext();
         this.errorPageURL = errorPageURL;
         this.request = request;
-         this.response = response;
+        this.response = response;
+
 
         // Setup session (if required)
         if (request instanceof HttpServletRequest && needsSession)
@@ -185,7 +179,8 @@
                 ((JspWriterImpl)out).flushBuffer();
             }
         } catch (IOException ex) {
-            log.warn("Internal error flushing the buffer in release()");
+            context.log(
+                "PageContextImpl.release(): Internal error flushing buffer");
         }
 
         servlet = null;
@@ -199,8 +194,6 @@
         session = null;
 
         attributes.clear();
-        
-        log = null;
     }
 
     public Object getAttribute(final String name) {



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


Mime
View raw message