tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspFactoryImpl.java HttpJspBase.java
Date Mon, 21 Mar 2005 15:38:13 GMT
remm        2005/03/21 07:38:13

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java TldLocationsCache.java
                        JspConfig.java JspRuntimeContext.java SmapUtil.java
                        JspReader.java Compiler.java
               jasper2/src/share/org/apache/jasper
                        EmbeddedServletOptions.java
               jasper2/src/share/org/apache/jasper/servlet JspServlet.java
                        JspServletWrapper.java
               jasper2/src/share/org/apache/jasper/xmlparser UCSReader.java
                        ParserUtils.java UTF8Reader.java
               jasper2/src/share/org/apache/jasper/runtime
                        JspFactoryImpl.java HttpJspBase.java
  Log:
  - Per instance loggers in Jasper.
  
  Revision  Changes    Path
  1.57      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- TagLibraryInfoImpl.java	23 Jul 2004 22:45:38 -0000	1.56
  +++ TagLibraryInfoImpl.java	21 Mar 2005 15:38:12 -0000	1.57
  @@ -62,7 +62,7 @@
   class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
   
       // Logger
  -    private static Log log = LogFactory.getLog(TagLibraryInfoImpl.class);
  +    private Log log = LogFactory.getLog(TagLibraryInfoImpl.class);
   
       private Hashtable jarEntries;
       private JspCompilationContext ctxt;
  
  
  
  1.29      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java
  
  Index: TldLocationsCache.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- TldLocationsCache.java	14 Feb 2005 19:54:52 -0000	1.28
  +++ TldLocationsCache.java	21 Mar 2005 15:38:12 -0000	1.29
  @@ -77,7 +77,7 @@
   public class TldLocationsCache {
   
       // Logger
  -    private static Log log = LogFactory.getLog(TldLocationsCache.class);
  +    private Log log = LogFactory.getLog(TldLocationsCache.class);
   
       /**
        * The types of URI one may specify for a tag library
  
  
  
  1.17      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java
  
  Index: JspConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspConfig.java	17 Mar 2004 19:23:03 -0000	1.16
  +++ JspConfig.java	21 Mar 2005 15:38:12 -0000	1.17
  @@ -40,7 +40,7 @@
       private static final String WEB_XML = "/WEB-INF/web.xml";
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspConfig.class);
  +    private Log log = LogFactory.getLog(JspConfig.class);
   
       private Vector jspProperties = null;
       private ServletContext ctxt;
  
  
  
  1.27      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
  
  Index: JspRuntimeContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- JspRuntimeContext.java	19 Oct 2004 16:21:46 -0000	1.26
  +++ JspRuntimeContext.java	21 Mar 2005 15:38:12 -0000	1.27
  @@ -59,7 +59,7 @@
   public final class JspRuntimeContext implements Runnable {
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspRuntimeContext.class);
  +    private Log log = LogFactory.getLog(JspRuntimeContext.class);
   
       /*
        * Counts how many times the webapp's JSPs have been reloaded.
  
  
  
  1.27      +4 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java
  
  Index: SmapUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- SmapUtil.java	20 Sep 2004 18:27:09 -0000	1.26
  +++ SmapUtil.java	21 Mar 2005 15:38:12 -0000	1.27
  @@ -43,7 +43,7 @@
    */
   public class SmapUtil {
   
  -    private static org.apache.commons.logging.Log log=
  +    private org.apache.commons.logging.Log log=
           org.apache.commons.logging.LogFactory.getLog( SmapUtil.class );
   
       //*********************************************************************
  @@ -188,6 +188,9 @@
       // Installation logic (from Robert Field, JSR-045 spec lead)
       private static class SDEInstaller {
   
  +        private org.apache.commons.logging.Log log=
  +            org.apache.commons.logging.LogFactory.getLog( SDEInstaller.class );
  +
           static final String nameSDE = "SourceDebugExtension";
   
           byte[] orig;
  
  
  
  1.24      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java
  
  Index: JspReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JspReader.java	27 Jul 2004 21:59:39 -0000	1.23
  +++ JspReader.java	21 Mar 2005 15:38:12 -0000	1.24
  @@ -49,7 +49,7 @@
   class JspReader {
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspReader.class);
  +    private Log log = LogFactory.getLog(JspReader.class);
   
       private Mark current;
       private String master;
  
  
  
  1.99      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- Compiler.java	19 Oct 2004 20:18:02 -0000	1.98
  +++ Compiler.java	21 Mar 2005 15:38:12 -0000	1.99
  @@ -43,7 +43,7 @@
    * @author Mark Roth
    */
   public abstract class Compiler {
  -    protected static org.apache.commons.logging.Log log=
  +    protected org.apache.commons.logging.Log log=
           org.apache.commons.logging.LogFactory.getLog( Compiler.class );
   
       // ----------------------------------------------------------------- Static
  
  
  
  1.21      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java
  
  Index: EmbeddedServletOptions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- EmbeddedServletOptions.java	22 Oct 2004 17:13:27 -0000	1.20
  +++ EmbeddedServletOptions.java	21 Mar 2005 15:38:12 -0000	1.21
  @@ -40,7 +40,7 @@
   public final class EmbeddedServletOptions implements Options {
   
       // Logger
  -    private static Log log = LogFactory.getLog(EmbeddedServletOptions.class);
  +    private Log log = LogFactory.getLog(EmbeddedServletOptions.class);
   
       private Properties settings = new Properties();
       
  
  
  
  1.41      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- JspServlet.java	25 Jan 2005 18:53:17 -0000	1.40
  +++ JspServlet.java	21 Mar 2005 15:38:12 -0000	1.41
  @@ -54,7 +54,7 @@
   public class JspServlet extends HttpServlet {
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspServlet.class);
  +    private Log log = LogFactory.getLog(JspServlet.class);
   
       private ServletContext context;
       private ServletConfig config;
  
  
  
  1.39      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java
  
  Index: JspServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- JspServletWrapper.java	7 Jul 2004 16:28:58 -0000	1.38
  +++ JspServletWrapper.java	21 Mar 2005 15:38:12 -0000	1.39
  @@ -59,7 +59,7 @@
   public class JspServletWrapper {
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspServletWrapper.class);
  +    private Log log = LogFactory.getLog(JspServletWrapper.class);
   
       private Servlet theServlet;
       private String jspUri;
  
  
  
  1.4       +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/UCSReader.java
  
  Index: UCSReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/UCSReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UCSReader.java	17 Sep 2004 21:57:44 -0000	1.3
  +++ UCSReader.java	21 Mar 2005 15:38:12 -0000	1.4
  @@ -30,7 +30,7 @@
    */
   public class UCSReader extends Reader {
   
  -    private static org.apache.commons.logging.Log log=
  +    private org.apache.commons.logging.Log log=
           org.apache.commons.logging.LogFactory.getLog( UCSReader.class );
       
       //
  
  
  
  1.12      +41 -46    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
  
  Index: ParserUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ParserUtils.java	17 Sep 2004 21:02:34 -0000	1.11
  +++ ParserUtils.java	21 Mar 2005 15:38:12 -0000	1.12
  @@ -52,9 +52,6 @@
   
   public class ParserUtils {
   
  -    // Logger
  -    static Log log = LogFactory.getLog(ParserUtils.class);
  -
       /**
        * An error handler for use when parsing XML documents.
        */
  @@ -175,52 +172,50 @@
   // ------------------------------------------------------------ Private Classes
   
   class MyEntityResolver implements EntityResolver {
  -    
  +
  +    // Logger
  +    private Log log = LogFactory.getLog(MyEntityResolver.class);
  +
       public InputSource resolveEntity(String publicId, String systemId)
  -	throws SAXException
  -    {
  -	for (int i=0; i<Constants.CACHED_DTD_PUBLIC_IDS.length; i++) {
  -	    String cachedDtdPublicId = Constants.CACHED_DTD_PUBLIC_IDS[i];
  -	    if (cachedDtdPublicId.equals(publicId)) {
  -		String resourcePath = Constants.CACHED_DTD_RESOURCE_PATHS[i];
  -		InputStream input =
  -		    this.getClass().getResourceAsStream(resourcePath);
  -		if (input == null) {
  -		    throw new SAXException(
  -                        Localizer.getMessage("jsp.error.internal.filenotfound",
  -					     resourcePath));
  -		}
  -		InputSource isrc = new InputSource(input);
  -		return isrc;
  -	    }
  -	}
  -        if (ParserUtils.log.isDebugEnabled())
  -            ParserUtils.log.debug("Resolve entity failed"  + publicId + " "
  -			   + systemId );
  -	ParserUtils.log.error(Localizer.getMessage("jsp.error.parse.xml.invalidPublicId",
  -						   publicId));
  +            throws SAXException {
  +        for (int i = 0; i < Constants.CACHED_DTD_PUBLIC_IDS.length; i++) {
  +            String cachedDtdPublicId = Constants.CACHED_DTD_PUBLIC_IDS[i];
  +            if (cachedDtdPublicId.equals(publicId)) {
  +                String resourcePath = Constants.CACHED_DTD_RESOURCE_PATHS[i];
  +                InputStream input = this.getClass().getResourceAsStream(
  +                        resourcePath);
  +                if (input == null) {
  +                    throw new SAXException(Localizer.getMessage(
  +                            "jsp.error.internal.filenotfound", resourcePath));
  +                }
  +                InputSource isrc = new InputSource(input);
  +                return isrc;
  +            }
  +        }
  +        if (log.isDebugEnabled())
  +            log.debug("Resolve entity failed" + publicId + " " + systemId);
  +        log.error(Localizer.getMessage("jsp.error.parse.xml.invalidPublicId",
  +                publicId));
           return null;
       }
   }
   
   class MyErrorHandler implements ErrorHandler {
  -    public void warning(SAXParseException ex)
  -	throws SAXException
  -    {
  -        if (ParserUtils.log.isDebugEnabled())
  -            ParserUtils.log.debug("ParserUtils: warning ", ex );
  -	// We ignore warnings
  -    }
  -
  -    public void error(SAXParseException ex)
  -	throws SAXException
  -    {
  -	throw ex;
  -    }
  -
  -    public void fatalError(SAXParseException ex)
  -	throws SAXException
  -    {
  -	throw ex;
  +
  +    // Logger
  +    private Log log = LogFactory.getLog(MyErrorHandler.class);
  +
  +    public void warning(SAXParseException ex) throws SAXException {
  +        if (log.isDebugEnabled())
  +            log.debug("ParserUtils: warning ", ex);
  +        // We ignore warnings
       }
  -}
  +
  +    public void error(SAXParseException ex) throws SAXException {
  +        throw ex;
  +    }
  +
  +    public void fatalError(SAXParseException ex) throws SAXException {
  +        throw ex;
  +    }
  +}
  \ No newline at end of file
  
  
  
  1.5       +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/UTF8Reader.java
  
  Index: UTF8Reader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/UTF8Reader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UTF8Reader.java	17 Sep 2004 21:02:34 -0000	1.4
  +++ UTF8Reader.java	21 Mar 2005 15:38:12 -0000	1.5
  @@ -30,7 +30,7 @@
   public class UTF8Reader
       extends Reader {
   
  -    private static org.apache.commons.logging.Log log=
  +    private org.apache.commons.logging.Log log=
           org.apache.commons.logging.LogFactory.getLog( UTF8Reader.class );
       
       //
  
  
  
  1.6       +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java
  
  Index: JspFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspFactoryImpl.java	17 Mar 2004 19:23:04 -0000	1.5
  +++ JspFactoryImpl.java	21 Mar 2005 15:38:13 -0000	1.6
  @@ -37,7 +37,7 @@
   public class JspFactoryImpl extends JspFactory {
   
       // Logger
  -    private static Log log = LogFactory.getLog(JspFactoryImpl.class);
  +    private Log log = LogFactory.getLog(JspFactoryImpl.class);
   
       private static final String SPEC_VERSION = "2.0";
       private static final boolean USE_POOL = true;
  
  
  
  1.16      +2 -4      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/HttpJspBase.java
  
  Index: HttpJspBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/HttpJspBase.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HttpJspBase.java	17 Sep 2004 21:02:34 -0000	1.15
  +++ HttpJspBase.java	21 Mar 2005 15:38:13 -0000	1.16
  @@ -40,9 +40,6 @@
       
   {
       
  -    private static org.apache.commons.logging.Log log=
  -        org.apache.commons.logging.LogFactory.getLog( HttpJspBase.class );
  -    
       static {
           if( JspFactory.getDefaultFactory() == null ) {
               JspFactoryImpl factory = new JspFactoryImpl();
  @@ -62,7 +59,8 @@
                       factory.getClass().getClassLoader().loadClass( basePackage +
                                                                      "servlet.JspServletWrapper");
                   } catch (ClassNotFoundException ex) {
  -                    log.error("Jasper JspRuntimeContext preload of class failed: " +
  +                    org.apache.commons.logging.LogFactory.getLog( HttpJspBase.class )
  +                        .error("Jasper JspRuntimeContext preload of class failed: " +
                                          ex.getMessage(), ex);
                   }
               }
  
  
  

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


Mime
View raw message