remm        2005/08/30 15:38:34

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        AntCompiler.java JspRuntimeContext.java
  Log:
  - Restrict SystemLogHandler to the Ant compiler (the regular compiler does not
    need the nasty hacks).
  
  Revision  Changes    Path
  1.8       +6 -3      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java
  
  Index: AntCompiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AntCompiler.java  22 Oct 2004 17:13:27 -0000      1.7
  +++ AntCompiler.java  30 Aug 2005 22:38:33 -0000      1.8
  @@ -42,7 +42,10 @@
    */
   public class AntCompiler extends Compiler {
   
  -    
  +    static {
  +        System.setErr(new SystemLogHandler(System.err));
  +    }
  +
       // ----------------------------------------------------- Instance 
Variables
   
       protected Project project=null;
  @@ -223,14 +226,14 @@
           }
           
           errorReport.append(logger.getReport());
  -        
  +
           // Stop capturing the System.err output for this thread
           String errorCapture = SystemLogHandler.unsetThread();
           if (errorCapture != null) {
               errorReport.append(System.getProperty("line.separator"));
               errorReport.append(errorCapture);
           }
  -        
  +
           if (!ctxt.keepGenerated()) {
               File javaFile = new File(javaFileName);
               javaFile.delete();
  
  
  
  1.28      +1 -8      
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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JspRuntimeContext.java    21 Mar 2005 15:38:12 -0000      1.27
  +++ JspRuntimeContext.java    30 Aug 2005 22:38:33 -0000      1.28
  @@ -38,7 +38,6 @@
   import org.apache.jasper.Constants;
   import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.Options;
  -import org.apache.jasper.util.SystemLogHandler;
   import org.apache.jasper.runtime.JspFactoryImpl;
   import org.apache.jasper.security.SecurityClassLoad;
   import org.apache.jasper.servlet.JspServletWrapper;
  @@ -87,8 +86,6 @@
        */
       public JspRuntimeContext(ServletContext context, Options options) {
   
  -        System.setErr(new SystemLogHandler(System.err));
  -
           this.context = context;
           this.options = options;
   
  @@ -246,10 +243,6 @@
        * Process a "destory" event for this web application context.
        */                                                        
       public void destroy() {
  -
  -        if(System.err instanceof SystemLogHandler)
  -            System.setErr(((SystemLogHandler)System.err).getWrapped());
  -
           threadStop();
   
           Iterator servlets = jsps.values().iterator();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to