luehe       2004/05/24 14:22:00

  Modified:    jasper2/src/share/org/apache/jasper/servlet
                        JspServletWrapper.java
  Log:
  - Added comments
  - Removed redundant "if (reload)" prior to calling getServlet()
    (reload flag is already being checked inside getServlet())
  
  Revision  Changes    Path
  1.36      +14 -6     
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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- JspServletWrapper.java    20 Apr 2004 00:05:09 -0000      1.35
  +++ JspServletWrapper.java    24 May 2004 21:22:00 -0000      1.36
  @@ -157,7 +157,7 @@
           return config.getServletContext();
       }
   
  -    /*
  +    /**
        * Sets the compilation exception for this JspServletWrapper.
        *
        * @param je The compilation exception
  @@ -166,7 +166,6 @@
           this.compileException = je;
       }
   
  -
       /**
        * Compile (if needed) and load a tag file
        */
  @@ -266,28 +265,37 @@
                        Localizer.getMessage("jsp.error.unavailable"));
               }
   
  +            /*
  +             * (1) Compile
  +             */
               if (options.getDevelopment() || firstTime ) {
                   synchronized (this) {
                       if (firstTime) {
                           firstTime = false;
                       }
  +                    // The following sets reload to true, if necessary
                       ctxt.compile();
                   }
               } else {
                   if (compileException != null) {
  +                    // Throw cached compilation exception
                       throw compileException;
                   }
               }
   
  -            if (reload) {
  -                getServlet();
  -            }
  +            /*
  +             * (2) (Re)load servlet class file
  +             */
  +            getServlet();
   
  -            // If a page is to only to be precompiled return.
  +            // If a page is to be precompiled only, return.
               if (precompile) {
                   return;
               }
   
  +            /*
  +             * (3) Service request
  +             */
               if (theServlet instanceof SingleThreadModel) {
                  // sync on the wrapper so that the freshness
                  // of the page is determined right before servicing
  
  
  

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

Reply via email to