larryi 00/12/05 05:20:47
Modified: src/share/org/apache/tomcat/core ContextManager.java
Log:
Port showDebugInfo property from Tomcat 3.2.
Make handlerError() public.
Revision Changes Path
1.156 +21 -2
jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
Index: ContextManager.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- ContextManager.java 2000/12/05 06:24:45 1.155
+++ ContextManager.java 2000/12/05 13:20:46 1.156
@@ -248,6 +248,11 @@
*/
private String installDir;
+ /** The flag which controls the display of
+ * debugging information in default responses
+ */
+ boolean showDebugInfo = true;
+
// Server properties ( interceptors, etc ) - it's one level above "/"
private Container defaultContainer;
@@ -336,7 +341,21 @@
public final int getState() {
return state;
}
+
+ /** The showDebugInfo property state. To be used for controlling the
+ * display of debugging information in default responses.
+ **/
+ public final boolean isShowDebugInfo() {
+ return showDebugInfo;
+ }
+ /** Sets the showDebugInfo property used for controlling the display of
+ * debugging information in default responses.
+ */
+ public void setShowDebugInfo(boolean showDebugInfo) {
+ this.showDebugInfo = showDebugInfo;
+ }
+
/**
* Parent loader is the "base" class loader of the
* application that starts tomcat, and includes no
@@ -875,7 +894,7 @@
// -------------------- Error handling --------------------
-
+
/** Called for error-codes. Will call the error hook.
*/
public final void handleStatus( Request req, Response res, int code ) {
@@ -895,7 +914,7 @@
/**
* Call error hook
*/
- void handleError( Request req, Response res , Throwable t ) {
+ public final void handleError( Request req, Response res , Throwable t ) {
BaseInterceptor ri[];
int status;
ri=req.getContainer().getInterceptors( Container.H_handleError );