tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/jasper/servlet JspServlet.java
Date Tue, 20 Feb 2001 03:36:01 GMT
costin      01/02/19 19:36:01

  Modified:    src/share/org/apache/jasper Constants.java JspC.java
               src/share/org/apache/jasper/compiler JasperMangler.java
               src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Changes for the new package names, plus use of Log.
  
  Revision  Changes    Path
  1.16      +4 -4      jakarta-tomcat/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Constants.java	2000/12/04 23:40:46	1.15
  +++ Constants.java	2001/02/20 03:36:00	1.16
  @@ -60,8 +60,8 @@
   import java.util.MissingResourceException;
   import java.text.MessageFormat;
   
  -import org.apache.tomcat.util.log.*;
  -
  +import org.apache.tomcat.util.log.Log;
  + 
   /**
    * Some constants and other global data that are used by the compiler and the runtime.
    *
  @@ -257,12 +257,12 @@
        */
       public static final void message(String key, Object[] args, int verbosityLevel) {
   	if (jasperLog == null)
  -	    jasperLog = Logger.getLogger("JASPER_LOG");
  +	    jasperLog = Log.getLog("JASPER_LOG", null);
   
   	if (jasperLog != null)
   	    jasperLog.log(getString(key, args), verbosityLevel);
       }
   
  -    public static Logger jasperLog = null;
  +    public static Log jasperLog = null;
   }
   
  
  
  
  1.20      +18 -16    jakarta-tomcat/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JspC.java	2001/01/14 20:45:40	1.19
  +++ JspC.java	2001/02/20 03:36:00	1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 1.19 2001/01/14
20:45:40 larryi Exp $
  - * $Revision: 1.19 $
  - * $Date: 2001/01/14 20:45:40 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 1.20 2001/02/20
03:36:00 costin Exp $
  + * $Revision: 1.20 $
  + * $Date: 2001/02/20 03:36:00 $
    *
    * ====================================================================
    * 
  @@ -116,7 +116,7 @@
       boolean largeFile = false;
       boolean mappedFile = false;
   
  -    int jspVerbosityLevel = Logger.INFORMATION;
  +    int jspVerbosityLevel = Log.INFORMATION;
   
       File scratchDir;
   
  @@ -245,15 +245,15 @@
           args = arg;
           String tok;
   
  -        int verbosityLevel = Logger.WARNING;
  +        int verbosityLevel = Log.WARNING;
           dieLevel = NO_DIE_LEVEL;
           die = dieLevel;
   
           while ((tok = nextArg()) != null) {
               if (tok.equals(SWITCH_QUIET)) {
  -                verbosityLevel = Logger.WARNING;
  +                verbosityLevel = Log.WARNING;
               } else if (tok.equals(SWITCH_VERBOSE)) {
  -                verbosityLevel = Logger.INFORMATION;
  +                verbosityLevel = Log.INFORMATION;
               } else if (tok.startsWith(SWITCH_VERBOSE)) {
                   try {
                       verbosityLevel
  @@ -322,8 +322,10 @@
               }
           }
   
  -        Constants.jasperLog = new QueueLogger();
  -        Constants.jasperLog.setVerbosityLevel(verbosityLevel);
  +	QueueLogger ql = new QueueLogger();
  +	ql.setVerbosityLevel(verbosityLevel);
  +        Constants.jasperLog = Log.getLog("JASPER_LOG", this );
  +        Constants.jasperLog.setLogger( ql );
   
       }
       
  @@ -400,16 +402,16 @@
           } catch (JasperException je) {
               //je.printStackTrace(log);
               Constants.message("jspc.error.jasperException", 
  -                    new Object[] {file, je}, Logger.ERROR);
  +                    new Object[] {file, je}, Log.ERROR);
               if (dieLevel != NO_DIE_LEVEL) {
                   dieOnExit = true;
               }
           } catch (FileNotFoundException fne) {
                   Constants.message("jspc.error.fileDoesNotExist", 
  -                        new Object[] {fne.getMessage()}, Logger.WARNING);
  +                        new Object[] {fne.getMessage()}, Log.WARNING);
           } catch (Exception e) {
               Constants.message("jspc.error.generalException", 
  -                    new Object[] {file, e}, Logger.ERROR);
  +                    new Object[] {file, e}, Log.ERROR);
               if (dieLevel != NO_DIE_LEVEL) {
                   dieOnExit = true;
               }
  @@ -443,13 +445,13 @@
                   } else {
                       // end of arguments, nothing left to parse
                       Constants.message("jspc.error.emptyWebApp", 
  -                            Logger.ERROR);
  +                            Log.ERROR);
                       return;
                   }
               }
               if (!f.exists()) {
                   Constants.message("jspc.error.fileDoesNotExist", 
  -                        new Object[] {f}, Logger.WARNING);
  +                        new Object[] {f}, Log.WARNING);
                   argPos++;
                   if (webApp) {
                       argPos++;
  @@ -486,7 +488,7 @@
                               uriBase = tUriBase;
                               Constants.message("jspc.implicit.uriRoot",
                                                 new Object[] { uriRoot },
  -                                              Logger.INFORMATION);
  +                                              Log.INFORMATION);
                               break;
                           }
                           if (f.exists() && f.isDirectory()) {
  @@ -534,7 +536,7 @@
                   String base = nextFile();
                   if (base == null) {
                       Constants.message("jspc.error.emptyWebApp", 
  -                            Logger.ERROR);
  +                            Log.ERROR);
                       return;
                   }// else if (".".equals(base)) {
                   //    base = "";
  
  
  
  1.4       +1 -1      jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java
  
  Index: JasperMangler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JasperMangler.java	2001/02/12 04:07:00	1.3
  +++ JasperMangler.java	2001/02/20 03:36:00	1.4
  @@ -62,7 +62,7 @@
   
   // utils - can be moved here if needed
   import org.apache.tomcat.util.JavaGeneratorTool;
  -import org.apache.tomcat.util.FileUtil;
  +import org.apache.tomcat.util.io.FileUtil;
   
   
   /** Mangler implementation - use the directory of the jsp file as a package
  
  
  
  1.7       +11 -11    jakarta-tomcat/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JspServlet.java	2001/01/07 19:24:28	1.6
  +++ JspServlet.java	2001/02/20 03:36:00	1.7
  @@ -84,7 +84,7 @@
   
   import org.apache.jasper.compiler.Compiler;
   
  -import org.apache.tomcat.util.log.*;
  +import org.apache.tomcat.util.log.Log;
   
   /**
    * The JSP engine (a.k.a Jasper)! 
  @@ -94,7 +94,7 @@
    */
   public class JspServlet extends HttpServlet {
   
  -    Log loghelper = new Log("JASPER_LOG", "JspServlet");
  +    Log loghelper = Log.getLog("JASPER_LOG", "JspServlet");
   
       class JspServletWrapper {
           Servlet theServlet;
  @@ -149,7 +149,7 @@
                                     accordingto,
                                     cp == null ? "" : cp
                                 }, 
  -                              Logger.INFORMATION);
  +                              Log.INFORMATION);
   
               if (loadJSP(jspUri, cp, isErrorPage, req, res) 
                       || theServlet == null) {
  @@ -203,7 +203,7 @@
   					     new Object[] {
   						 ex.getMessage()
   					     }), ex,
  -					    Logger.ERROR);
  +					    Log.ERROR);
   		    // rethrow FileNotFoundException so someone higher up can handle
                       if (insecure_TMI)
                           throw ex;
  @@ -267,13 +267,13 @@
               Constants.message("jsp.message.parent_class_loader_is", 
                                 new Object[] {
                                     parentClassLoader.toString()
  -                              }, Logger.DEBUG);
  +                              }, Log.DEBUG);
               }
   	else {
               Constants.message("jsp.message.parent_class_loader_is", 
                                 new Object[] {
                                     "<none>"
  -                              }, Logger.DEBUG);
  +                              }, Log.DEBUG);
   	}
   	//	System.out.println("JspServlet: init " + config.getServletName() );
   	if( loader==null ) {
  @@ -298,8 +298,8 @@
   	    Constants.message("jsp.message.scratch.dir.is", 
   			      new Object[] { 
   				  options.getScratchDir().toString() 
  -			      }, Logger.INFORMATION );
  -	    Constants.message("jsp.message.dont.modify.servlets", Logger.INFORMATION);
  +			      }, Log.INFORMATION );
  +	    Constants.message("jsp.message.dont.modify.servlets", Log.INFORMATION);
   	    JspFactory.setDefaultFactory(new JspFactoryImpl());
   	}
       }
  @@ -371,10 +371,10 @@
   
               boolean precompile = preCompile(request);
   
  -	    Logger jasperLog = Constants.jasperLog;
  +	    Log jasperLog = Constants.jasperLog;
   	    
               if (jasperLog != null &&
  -		jasperLog.matchVerbosityLevel(Logger.INFORMATION))
  +		jasperLog.getLevel() >= Log.INFORMATION)
   		{
   		    jasperLog.log("JspEngine --> "+jspUri);
   		    jasperLog.log("\t     ServletPath: "+request.getServletPath());
  @@ -411,7 +411,7 @@
   
       public void destroy() {
   	if (Constants.jasperLog != null)
  -	    Constants.jasperLog.log("JspServlet.destroy()", Logger.INFORMATION);
  +	    Constants.jasperLog.log("JspServlet.destroy()", Log.INFORMATION);
   
   	Enumeration servlets = jsps.elements();
   	while (servlets.hasMoreElements()) 
  
  
  

Mime
View raw message