craigmcc    01/06/23 16:41:51

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  Re-expose the application resources and welcome file list as context
  attributes during a reload.
  
  Revision  Changes    Path
  1.67      +21 -7     
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- StandardContext.java      2001/06/23 21:55:39     1.66
  +++ StandardContext.java      2001/06/23 23:41:51     1.67
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.66 2001/06/23 21:55:39 remm Exp $
  - * $Revision: 1.66 $
  - * $Date: 2001/06/23 21:55:39 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.67 2001/06/23 23:41:51 craigmcc Exp $
  + * $Revision: 1.67 $
  + * $Date: 2001/06/23 23:41:51 $
    *
    * ====================================================================
    *
  @@ -141,7 +141,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.66 $ $Date: 2001/06/23 21:55:39 $
  + * @version $Revision: 1.67 $ $Date: 2001/06/23 23:41:51 $
    */
   
   public class StandardContext
  @@ -990,9 +990,7 @@
           }
           super.setResources(resources);
           if (started)
  -            // We put the resources into the servlet context
  -            getServletContext().setAttribute
  -                (Globals.RESOURCES_ATTR, getResources());
  +            postResources(); // As a servlet context attribute
   
       }
   
  @@ -2393,6 +2391,10 @@
               }
           }
   
  +        // Restore the "Welcome Files" and "Resources" context attributes
  +        postResources();
  +        postWelcomeFiles();
  +
           // Set the context class loader to the old class loader
           if (classLoader != null) {
               Thread.currentThread().setContextClassLoader(oldCtxClassLoader);
  @@ -3737,6 +3739,18 @@
       private boolean getPaused() {
   
        return (this.paused);
  +
  +    }
  +
  +
  +    /**
  +     * Post a copy of our web application resources as a servlet context
  +     * attribute.
  +     */
  +    private void postResources() {
  +
  +        getServletContext().setAttribute
  +            (Globals.RESOURCES_ATTR, getResources());
   
       }
   
  
  
  

Reply via email to