costin 2002/08/20 20:26:34 Modified: catalina/src/share/org/apache/catalina Host.java catalina/src/share/org/apache/catalina/core StandardHost.java Log: Part 2 of the patch to make validation configurable. Also changed to commons-logging. ( I have most of the classes using commons-logging, but I have some extra debug and timing info I need to remove - so it'll be gradual ) Revision Changes Path 1.2 +36 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java Index: Host.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Host.java 18 Jul 2002 16:47:37 -0000 1.1 +++ Host.java 21 Aug 2002 03:26:34 -0000 1.2 @@ -173,6 +173,38 @@ public void setName(String name); + /** + * Get the server.xml <host> attribute's xmlNamespaceAware. + * @return true if namespace awarenes is enabled. + * + */ + public boolean getXmlNamespaceAware(); + + + /** + * Get the server.xml <host> attribute's xmlValidation. + * @return true if validation is enabled. + * + */ + public boolean getXmlValidation(); + + + /** + * 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); + + + /** + * 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); + + // --------------------------------------------------------- Public Methods 1.2 +60 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java Index: StandardHost.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- StandardHost.java 18 Jul 2002 16:48:08 -0000 1.1 +++ StandardHost.java 21 Aug 2002 03:26:34 -0000 1.2 @@ -102,7 +102,9 @@ extends ContainerBase implements Deployer, Host { - + private static org.apache.commons.logging.Log log= + org.apache.commons.logging.LogFactory.getLog( StandardHost.class ); + // ----------------------------------------------------------- Constructors @@ -212,6 +214,21 @@ */ private DefaultContext defaultContext; + + + /** + * 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 @@ -502,8 +519,44 @@ } + /** + * 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; + } + + /** * Host work directory base. */ public String getWorkDir() { @@ -641,7 +694,7 @@ // Complain if no Context has been selected if (context == null) { - log(sm.getString("standardHost.mappingError", uri)); + log.error(sm.getString("standardHost.mappingError", uri)); return (null); } @@ -726,7 +779,7 @@ .newInstance(); addValve(valve); } catch (Throwable t) { - log(sm.getString + log.error(sm.getString ("standardHost.invalidErrorReportValveClass", errorReportValveClass)); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>