Return-Path:
StandardHost
implementation class.
ContextRuleSet
associated with our
* digester
instance.
*/
- private ContextRuleSet digesterRuleSet = null;
+ private ContextRuleSet contextRuleSet = null;
/**
@@ -148,6 +149,13 @@
/**
+ * The NamingRuleSet
associated with our
+ * digester
instance.
+ */
+ private NamingRuleSet namingRuleSet = null;
+
+
+ /**
* The document base which should replace the value specified in the
* Context
being added in the addChild()
method,
* or null
if the original value should remain untouched.
@@ -364,6 +372,7 @@
try {
stream = config.openStream();
Digester digester = createDigester();
+ digester.setDebug(host.getDebug());
digester.clear();
digester.push(this);
digester.parse(stream);
@@ -586,8 +595,10 @@
if (host.getDebug() > 0)
digester.setDebug(3);
digester.setValidating(false);
- digesterRuleSet = new ContextRuleSet("");
- digester.addRuleSet(digesterRuleSet);
+ contextRuleSet = new ContextRuleSet("");
+ digester.addRuleSet(contextRuleSet);
+ namingRuleSet = new NamingRuleSet("Context/");
+ digester.addRuleSet(namingRuleSet);
}
return (digester);
1.15 +33 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java
Index: StandardServer.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- StandardServer.java 2001/11/09 19:39:11 1.14
+++ StandardServer.java 2001/11/10 00:01:54 1.15
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v 1.14 2001/11/09 19:39:11 remm Exp $
- * $Revision: 1.14 $
- * $Date: 2001/11/09 19:39:11 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v 1.15 2001/11/10 00:01:54 craigmcc Exp $
+ * $Revision: 1.15 $
+ * $Date: 2001/11/10 00:01:54 $
*
* ====================================================================
*
@@ -90,7 +90,7 @@
* (but not required) when deploying and starting Catalina.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.14 $ $Date: 2001/11/09 19:39:11 $
+ * @version $Revision: 1.15 $ $Date: 2001/11/10 00:01:54 $
*/
public final class StandardServer
@@ -115,6 +115,12 @@
/**
+ * Debugging detail level.
+ */
+ private int debug = 0;
+
+
+ /**
* Global naming resources.
*/
private NamingResources globalNamingResources = null;
@@ -187,6 +193,28 @@
/**
+ * Return the debugging detail level.
+ */
+ public int getDebug() {
+
+ return (this.debug);
+
+ }
+
+
+ /**
+ * Set the debugging detail level.
+ *
+ * @param debug The new debugging detail level
+ */
+ public void setDebug(int debug) {
+
+ this.debug = debug;
+
+ }
+
+
+ /**
* Return the global naming resources.
*/
public NamingResources getGlobalNamingResources() {
@@ -561,6 +589,7 @@
if ((globalNamingResources != null)
&& (namingContextListener == null)) {
namingContextListener = new NamingContextListener();
+ namingContextListener.setDebug(getDebug());
addLifecycleListener(namingContextListener);
}
}
1.56 +6 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Index: ContextConfig.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ContextConfig.java 2001/11/08 21:14:25 1.55
+++ ContextConfig.java 2001/11/10 00:01:55 1.56
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v 1.55 2001/11/08 21:14:25 remm Exp $
- * $Revision: 1.55 $
- * $Date: 2001/11/08 21:14:25 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v 1.56 2001/11/10 00:01:55 craigmcc Exp $
+ * $Revision: 1.56 $
+ * $Date: 2001/11/10 00:01:55 $
*
* ====================================================================
*
@@ -127,7 +127,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.55 $ $Date: 2001/11/08 21:14:25 $
+ * @version $Revision: 1.56 $ $Date: 2001/11/10 00:01:55 $
*/
public final class ContextConfig
@@ -263,6 +263,7 @@
// Process the application web.xml file
try {
Digester digester = createWebDigester();
+ digester.setDebug(getDebug());
synchronized (digester) {
if (context instanceof StandardContext)
((StandardContext) context).setReplaceWelcomeFiles(true);
@@ -500,6 +501,7 @@
// Process the default web.xml file
try {
Digester digester = createWebDigester();
+ digester.setDebug(getDebug());
synchronized (digester) {
if (context instanceof StandardContext)
((StandardContext) context).setReplaceWelcomeFiles(true);
1.2 +36 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ResourceRef.java
Index: ResourceRef.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ResourceRef.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ResourceRef.java 2000/11/04 06:46:08 1.1
+++ ResourceRef.java 2001/11/10 00:01:55 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ResourceRef.java,v 1.1 2000/11/04 06:46:08 remm Exp $
- * $Revision: 1.1 $
- * $Date: 2000/11/04 06:46:08 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ResourceRef.java,v 1.2 2001/11/10 00:01:55 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2001/11/10 00:01:55 $
*
* ====================================================================
*
@@ -64,7 +64,9 @@
package org.apache.naming;
+import java.util.Enumeration;
import java.util.Hashtable;
+import javax.naming.RefAddr;
import javax.naming.Reference;
import javax.naming.Context;
import javax.naming.StringRefAddr;
@@ -73,7 +75,7 @@
* Represents a reference address to a resource.
*
* @author Remy Maucherat
- * @version $Revision: 1.1 $ $Date: 2000/11/04 06:46:08 $
+ * @version $Revision: 1.2 $ $Date: 2001/11/10 00:01:55 $
*/
public class ResourceRef
@@ -173,6 +175,36 @@
return DEFAULT_FACTORY;
}
}
+ }
+
+
+ // --------------------------------------------------------- Public Methods
+
+
+ /**
+ * Return a String rendering of this object.
+ */
+ public String toString() {
+
+ StringBuffer sb = new StringBuffer("ResourceRef[");
+ sb.append("className=");
+ sb.append(getClassName());
+ sb.append(",factoryClassLocation=");
+ sb.append(getFactoryClassLocation());
+ sb.append(",factoryClassName=");
+ sb.append(getFactoryClassName());
+ Enumeration refAddrs = getAll();
+ while (refAddrs.hasMoreElements()) {
+ RefAddr refAddr = (RefAddr) refAddrs.nextElement();
+ sb.append(",{type=");
+ sb.append(refAddr.getType());
+ sb.append(",content=");
+ sb.append(refAddr.getContent());
+ sb.append("}");
+ }
+ sb.append("]");
+ return (sb.toString());
+
}
--
To unsubscribe, e-mail: