You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by yo...@apache.org on 2006/12/26 16:24:51 UTC
svn commit: r490308 - in
/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper: ./
compiler/ runtime/ servlet/ xmlparser/
Author: yoavs
Date: Tue Dec 26 07:24:49 2006
New Revision: 490308
URL: http://svn.apache.org/viewvc?view=rev&rev=490308
Log:
Bugzilla 39975: don't have static Log references.
Modified:
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/JspC.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,10 +37,9 @@
* @author Hans Bergsten
* @author Pierre Delisle
*/
-public final class EmbeddedServletOptions implements Options {
-
- // Logger
- private static Log log = LogFactory.getLog(EmbeddedServletOptions.class);
+public class EmbeddedServletOptions implements Options {
+ /** Logger (set by constructor. ) */
+ private Log log;
private Properties settings = new Properties();
@@ -353,10 +352,11 @@
*/
public EmbeddedServletOptions(ServletConfig config,
ServletContext context) {
+ log = LogFactory.getLog(getClass());
- Enumeration enum=config.getInitParameterNames();
- while( enum.hasMoreElements() ) {
- String k=(String)enum.nextElement();
+ Enumeration enums=config.getInitParameterNames();
+ while( enums.hasMoreElements() ) {
+ String k=(String)enums.nextElement();
String v=config.getInitParameter( k );
setProperty( k, v);
}
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/JspC.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/JspC.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/JspC.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/JspC.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,8 +88,8 @@
public static final String DEFAULT_IE_CLASS_ID =
"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
- // Logger
- private static Log log = LogFactory.getLog(JspC.class);
+ /** Logger (set by constructor. ) */
+ private Log log;
private static final String SWITCH_VERBOSE = "-v";
private static final String SWITCH_HELP = "-help";
@@ -218,6 +218,11 @@
}
}
}
+ }
+
+ /** Constructor. */
+ public JspC() {
+ log = LogFactory.getLog(getClass());
}
public void setArgs(String[] arg) throws JasperException {
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,8 @@
import java.util.List;
import java.util.StringTokenizer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
import org.apache.jasper.Options;
@@ -52,8 +54,8 @@
* @author Mark Roth
*/
public class Compiler {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( Compiler.class );
+ /** Logger (set by constructor.) */
+ private Log log;
// ----------------------------------------------------------------- Static
@@ -87,6 +89,8 @@
public Compiler(JspCompilationContext ctxt, JspServletWrapper jsw) {
+ log = LogFactory.getLog(getClass());
+
this.jsw = jsw;
this.ctxt = ctxt;
this.options = ctxt.getOptions();
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1823,9 +1823,9 @@
out.print(" + " + elemName);
// Write remaining attributes
- Enumeration enum = map.keys();
- while (enum.hasMoreElements()) {
- String attrName = (String)enum.nextElement();
+ Enumeration enums = map.keys();
+ while (enums.hasMoreElements()) {
+ String attrName = (String)enums.nextElement();
out.print((String)map.get(attrName));
}
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,8 +41,8 @@
private static final String WEB_XML = "/WEB-INF/web.xml";
- // Logger
- private static Log log = LogFactory.getLog(JspConfig.class);
+ /** Logger (set by constructor.) */
+ private Log log;
private Vector jspProperties = null;
private ServletContext ctxt;
@@ -54,6 +54,8 @@
private JspProperty defaultJspProperty;
public JspConfig(ServletContext ctxt) {
+ log = LogFactory.getLog(getClass());
+
this.ctxt = ctxt;
}
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java Tue Dec 26 07:24:49 2006
@@ -47,9 +47,8 @@
*/
class JspReader {
-
- // Logger
- private static Log log = LogFactory.getLog(JspReader.class);
+ /** Logger (set by constructor.) */
+ private Log log;
private Mark current;
private String master;
@@ -90,6 +89,7 @@
InputStreamReader reader,
ErrorDispatcher err)
throws JasperException, FileNotFoundException {
+ log = LogFactory.getLog(getClass());
this.context = ctxt;
this.err = err;
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,10 +55,9 @@
* @author Glenn L. Nielsen
* @version $Revision$
*/
-public final class JspRuntimeContext implements Runnable {
-
- // Logger
- private static Log log = LogFactory.getLog(JspRuntimeContext.class);
+public class JspRuntimeContext implements Runnable {
+ /** Logger (set by constructor.) */
+ private Log log;
/*
* Counts how many times the webapp's JSPs have been reloaded.
@@ -75,7 +74,7 @@
JspFactory.setDefaultFactory(factory);
}
- // ----------------------------------------------------------- Constructors
+ // ----------------------------------------------------------- Constructor
/**
* Create a JspRuntimeContext for a web application context.
@@ -85,6 +84,7 @@
* @param context ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
+ log = LogFactory.getLog(getClass());
System.setErr(new SystemLogHandler(System.err));
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,9 +60,8 @@
* @author Jan Luehe
*/
class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
-
- // Logger
- private static Log log = LogFactory.getLog(TagLibraryInfoImpl.class);
+ /** Logger (set by constructor.) */
+ private Log log;
private Hashtable jarEntries;
private JspCompilationContext ctxt;
@@ -135,6 +134,8 @@
ErrorDispatcher err) throws JasperException {
super(prefix, uriIn);
+ log = LogFactory.getLog(getClass());
+
this.ctxt = ctxt;
this.parserController = pc;
this.err = err;
@@ -186,12 +187,12 @@
if (in != null) {
try {
in.close();
- } catch (Throwable t) {}
+ } catch (Exception e) {}
}
if (jarFile != null) {
try {
jarFile.close();
- } catch (Throwable t) {}
+ } catch (Exception e) {}
}
}
@@ -292,9 +293,9 @@
this.functions = new FunctionInfo[functionTable.size()];
int i=0;
- Enumeration enum = functionTable.elements();
- while (enum.hasMoreElements()) {
- this.functions[i++] = (FunctionInfo) enum.nextElement();
+ Enumeration enums = functionTable.elements();
+ while (enums.hasMoreElements()) {
+ this.functions[i++] = (FunctionInfo) enums.nextElement();
}
}
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,9 +72,8 @@
*/
public class TldLocationsCache {
-
- // Logger
- private static Log log = LogFactory.getLog(TldLocationsCache.class);
+ /** Logger (set by constructor.) */
+ private Log log;
/**
* The types of URI one may specify for a tag library
@@ -177,6 +176,8 @@
* If redeployMode is false, a faster but less capable mode will be used.
*/
public TldLocationsCache(ServletContext ctxt, boolean redeployMode) {
+ log = LogFactory.getLog(getClass());
+
this.ctxt = ctxt;
this.redeployMode = redeployMode;
mappings = new Hashtable();
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,14 +35,12 @@
* @author Anil K. Vijendran
*/
public class JspFactoryImpl extends JspFactory {
-
- // Logger
- private static Log log = LogFactory.getLog(JspFactoryImpl.class);
-
private static final String SPEC_VERSION = "2.0";
private static final boolean USE_POOL = true;
private SimplePool pool = new SimplePool( 100 );
+
+ /** Constructor. */
public PageContext getPageContext(Servlet servlet,
ServletRequest request,
@@ -104,9 +102,10 @@
pc.initialize(servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
return pc;
- } catch (Throwable ex) {
+ } catch (Exception e) {
/* FIXME: need to do something reasonable here!! */
- log.fatal("Exception initializing page context", ex);
+ Log log = LogFactory.getLog(getClass());
+ log.fatal("Exception initializing page context", e);
return null;
}
}
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,9 +63,8 @@
* @author Jan Luehe
*/
public class PageContextImpl extends PageContext implements VariableResolver {
-
- // Logger
- private static Log log = LogFactory.getLog(PageContextImpl.class);
+ /** Logger (set by constructor) .*/
+ private Log log;
// The expression evaluator, for evaluating EL expressions.
private static ExpressionEvaluatorImpl elExprEval
@@ -105,6 +104,8 @@
* Constructor.
*/
PageContextImpl(JspFactory factory) {
+ log = LogFactory.getLog(getclass());
+
this.factory = factory;
this.variableResolver = new VariableResolverImpl(this);
this.outs = new BodyContentImpl[0];
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PerThreadTagHandlerPool.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PerThreadTagHandlerPool.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/runtime/PerThreadTagHandlerPool.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -117,9 +117,9 @@
* Calls the release() method of all tag handlers in this tag handler pool.
*/
public void release() {
- Enumeration enum = perThreadDataVector.elements();
- while (enum.hasMoreElements()) {
- PerThreadData ptd = (PerThreadData)enum.nextElement();
+ Enumeration enums = perThreadDataVector.elements();
+ while (enums.hasMoreElements()) {
+ PerThreadData ptd = (PerThreadData)enums.nextElement();
if (ptd.handlers != null) {
for (int i=ptd.current; i>=0; i--) {
if (ptd.handlers[i] != null) {
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,9 +53,8 @@
* @author Glenn Nielsen
*/
public class JspServlet extends HttpServlet {
-
- // Logger
- private static Log log = LogFactory.getLog(JspServlet.class);
+ /** Logger (set by constructor.) */
+ private Log log;
private ServletContext context;
private ServletConfig config;
@@ -67,8 +66,10 @@
* Initializes this JspServlet.
*/
public void init(ServletConfig config) throws ServletException {
-
super.init(config);
+
+ log = LogFactory.getLog(getClass());
+
this.config = config;
this.context = config.getServletContext();
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,10 +57,6 @@
*/
public class JspServletWrapper {
-
- // Logger
- private static Log log = LogFactory.getLog(JspServletWrapper.class);
-
private Servlet theServlet;
private String jspUri;
private Class servletClass;
@@ -82,7 +78,6 @@
JspServletWrapper(ServletConfig config, Options options, String jspUri,
boolean isErrorPage, JspRuntimeContext rctxt)
throws JasperException {
-
this.isTagFile = false;
this.config = config;
this.options = options;
@@ -102,7 +97,6 @@
JspRuntimeContext rctxt,
URL tagFileJarUrl)
throws JasperException {
-
this.isTagFile = true;
this.config = null; // not used
this.options = options;
@@ -359,6 +353,7 @@
response.sendError(HttpServletResponse.SC_NOT_FOUND,
ex.getMessage());
} catch (IllegalStateException ise) {
+ Log log = logFactory.getLog(getClass());
log.error(Localizer.getMessage("jsp.error.file.not.found",
ex.getMessage()),
ex);
Modified: tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java?view=diff&rev=490308&r1=490307&r2=490308
==============================================================================
--- tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java (original)
+++ tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java Tue Dec 26 07:24:49 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,10 +51,6 @@
*/
public class ParserUtils {
-
- // Logger
- static Log log = LogFactory.getLog(ParserUtils.class);
-
/**
* An error handler for use when parsing XML documents.
*/
@@ -212,7 +208,8 @@
}
System.out.println("Resolve entity failed" + publicId + " "
+ systemId );
- ParserUtils.log.error(Localizer.getMessage("jsp.error.parse.xml.invalidPublicId",
+ Log log = LogFactory.getLog(getClass());
+ log.error(Localizer.getMessage("jsp.error.parse.xml.invalidPublicId",
publicId));
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org