tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java
Date Wed, 21 Aug 2002 22:10:35 GMT
patrickl    2002/08/21 15:10:35

  Modified:    catalina/src/share/org/apache/catalina/startup
                        HostConfig.java
  Log:
  Make XML schema validation off by default and allow it to be turned on via attributes in
the <Host> element in server.xml.
  Submitted by:	Jean-Francois Arcand (jeanfrancois.arcand@sun.com)
  
  Revision  Changes    Path
  1.3       +54 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HostConfig.java	21 Aug 2002 03:29:31 -0000	1.2
  +++ HostConfig.java	21 Aug 2002 22:10:34 -0000	1.3
  @@ -202,6 +202,17 @@
        */
       private HashMap webXmlLastModified = new HashMap();
   
  +    /**
  +     * Attribute value used to turn on/off XML validation
  +     */
  +     private boolean xmlValidation = false;
  +
  +
  +    /**
  +     * Attribute value used to turn on/off XML namespace awarenes.
  +     */
  +     private boolean xmlNamespaceAware = false;
  +
   
       // ------------------------------------------------------------- Properties
   
  @@ -336,7 +347,44 @@
           this.unpackWARs = unpackWARs;
   
       }
  +    
  +    
  +     /**
  +     * Set the validation feature of the XML parser used when
  +     * parsing xml instances.
  +     * @param xmlValidation true to enable xml instance validation
  +     */
  +    public void setXmlValidation(boolean xmlValidation){
  +        this.xmlValidation = xmlValidation;
  +    }
  +
  +    /**
  +     * Get the server.xml <host> attribute's xmlValidation.
  +     * @return true if validation is enabled.
  +     *
  +     */
  +    public boolean getXmlValidation(){
  +        return xmlValidation;
  +    }
   
  +    /**
  +     * Get the server.xml <host> attribute's xmlNamespaceAware.
  +     * @return true if namespace awarenes is enabled.
  +     *
  +     */
  +    public boolean getXmlNamespaceAware(){
  +        return xmlNamespaceAware;
  +    }
  +
  +
  +    /**
  +     * Set the namespace aware feature of the XML parser used when
  +     * parsing xml instances.
  +     * @param xmlNamespaceAware true to enable namespace awareness
  +     */
  +    public void setXmlNamespaceAware(boolean xmlNamespaceAware){
  +        this.xmlNamespaceAware=xmlNamespaceAware;
  +    }    
   
       // --------------------------------------------------------- Public Methods
   
  @@ -359,6 +407,8 @@
                   setDeployXML(((StandardHost) host).isDeployXML());
                   setLiveDeploy(((StandardHost) host).getLiveDeploy());
                   setUnpackWARs(((StandardHost) host).isUnpackWARs());
  +                setXmlNamespaceAware(((StandardHost) host).getXmlNamespaceAware());
  +                setXmlValidation(((StandardHost) host).getXmlValidation());
               }
           } catch (ClassCastException e) {
               log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e);
  
  
  

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


Mime
View raw message