billbarker    02/01/08 22:57:42

  Modified:    src/facade22/org/apache/tomcat/facade JspInterceptor.java
  Log:
  Prevent writing out a useless .ver file in the case where the jsp doesn't exist.
  
  Under W98, this is enough to pass the sanity test.  Still needs testing under NT/W2K.
  
  Revision  Changes    Path
  1.35      +9 -9      
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- JspInterceptor.java       9 Jan 2002 06:33:38 -0000       1.34
  +++ JspInterceptor.java       9 Jan 2002 06:57:42 -0000       1.35
  @@ -602,6 +602,15 @@
                               ctx.getAbsolutePath(),
                               jspFile );
   
  +
  +            // If unsafe path or JSP file doesn't exist, return "not found"
  +            // Avoids creating work directories for non-existent JSP files
  +            String path=mangler.getJspFilePath();
  +            if( path == null )
  +                return 404;
  +            File f = new File( path );
  +            if( !f.exists() )
  +                return 404;
            // register the handler as dependent on the jspfile 
            if( dep==null ) {
                dep=setDependency( ctx, mangler, handler );
  @@ -618,15 +627,6 @@
                if( ! dep.isExpired() )
                    return 0;
            }
  -
  -            // If unsafe path or JSP file doesn't exist, return "not found"
  -            // Avoids creating work directories for non-existent JSP files
  -            String path=mangler.getJspFilePath();
  -            if( path == null )
  -                return 404;
  -            File f = new File( path );
  -            if( !f.exists() )
  -                return 404;
   
            //      if( debug > 3) 
            ctx.log( "Compiling: " + jspFile + " to " +
  
  
  

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

Reply via email to