tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfarc...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Mon, 03 Mar 2003 15:46:46 GMT
jfarcand    2003/03/03 07:46:45

  Modified:    catalina/src/share/org/apache/catalina Globals.java
               catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  Allow alternate deployment descriptor name (J2EE.8.3.1). By default this value will not
be set.
  
  bugtraq #4718559
  
  Revision  Changes    Path
  1.5       +10 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Globals.java	30 Jan 2003 18:22:47 -0000	1.4
  +++ Globals.java	3 Mar 2003 15:46:45 -0000	1.5
  @@ -74,6 +74,12 @@
   
   public final class Globals {
   
  +    /**
  +     * The servlet context attribute under which we store the alternate
  +     * deployment descriptor for this web application 
  +     */
  +    public static final String ALT_DD_ATTR = 
  +        "org.apache.catalina.deploy.alt_dd";
   
       /**
        * The request attribute under which we store the array of X509Certificate
  
  
  
  1.20      +22 -5     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StandardContext.java	31 Jan 2003 20:29:23 -0000	1.19
  +++ StandardContext.java	3 Mar 2003 15:46:45 -0000	1.20
  @@ -175,7 +175,12 @@
   
       // ----------------------------------------------------- Instance Variables
   
  +    /**
  +     * The alternate deployment descriptor name.
  +     */ 
  +     private String altDDName = null;
   
  +     
       /**
        * The set of application listener class names configured for this
        * application, in the order they were encountered in the web.xml file.
  @@ -785,6 +790,15 @@
   
       }
   
  +    /**
  +     * Set an alternate Deployment Descriptor name.
  +     */
  +    public void setAltDDName(String altDDName) {
  +        this.altDDName = altDDName;
  +        if (context != null) {
  +            context.setAttribute(Globals.ALT_DD_ATTR,altDDName);
  +        }
  +    }
   
       /**
        * Set the display name of this web application.
  @@ -1119,8 +1133,11 @@
        */
       public ServletContext getServletContext() {
   
  -        if (context == null)
  +        if (context == null) {
               context = new ApplicationContext(getBasePath(), this);
  +            if (altDDName != null) 
  +                context.setAttribute(Globals.ALT_DD_ATTR,altDDName);
  +        }
           return (context);
   
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message