import org.apache.catalina.connector.ResponseFacade;
import org.apache.catalina.util.InstanceSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
/**
* Standard implementation of <code>RequestDispatcher</code> that allows a
else
this.support = new InstanceSupport(wrapper);
- if ( log.isDebugEnabled() )
- log.debug("servletPath=" + this.servletPath + ", pathInfo=" +
- this.pathInfo + ", queryString=" + queryString +
- ", name=" + this.name);
-
}
// ----------------------------------------------------- Instance Variables
- private static Log log = LogFactory.getLog(ApplicationDispatcher.class);
-
/**
* The Context this RequestDispatcher is associated with.
*/
// Reset any output that has been buffered, but keep headers/cookies
if (response.isCommitted()) {
- if ( log.isDebugEnabled() )
- log.debug(" Forward on committed response --> ISE");
throw new IllegalStateException
(sm.getString("applicationDispatcher.forward.ise"));
}
try {
response.resetBuffer();
} catch (IllegalStateException e) {
- if ( log.isDebugEnabled() )
- log.debug(" Forward resetBuffer() returned ISE: " + e);
throw e;
}
// Handle a non-HTTP forward by passing the existing request/response
if ((hrequest == null) || (hresponse == null)) {
-
- if ( log.isDebugEnabled() )
- log.debug(" Non-HTTP Forward");
-
processRequest(hrequest,hresponse,state);
-
}
// Handle an HTTP named dispatcher forward
else if ((servletPath == null) && (pathInfo == null)) {
- if ( log.isDebugEnabled() )
- log.debug(" Named Dispatcher Forward");
-
ApplicationHttpRequest wrequest =
(ApplicationHttpRequest) wrapRequest(state);
wrequest.setRequestURI(hrequest.getRequestURI());
// Handle an HTTP path-based forward
else {
- if ( log.isDebugEnabled() )
- log.debug(" Path Based Forward");
-
ApplicationHttpRequest wrequest =
(ApplicationHttpRequest) wrapRequest(state);
String contextPath = context.getPath();
}
// This is not a real close in order to support error processing
- if ( log.isDebugEnabled() )
- log.debug(" Disabling the response for futher output");
+ if (wrapper.getLogger().isDebugEnabled() )
+ wrapper.getLogger().debug(" Disabling the response for futher output");
if (response instanceof ResponseFacade) {
((ResponseFacade) response).finish();
} else {
// Servlet SRV.6.2.2. The Resquest/Response may have been wrapped
// and may no longer be instance of RequestFacade
- if (log.isDebugEnabled()){
- log.debug( " The Response is vehiculed using a wrapper: "
+ if (wrapper.getLogger().isDebugEnabled()){
+ wrapper.getLogger().debug( " The Response is vehiculed using a wrapper: "
+ response.getClass().getName() );
}
// Handle a non-HTTP include
if (!(request instanceof HttpServletRequest) ||
!(response instanceof HttpServletResponse)) {
-
- if ( log.isDebugEnabled() )
- log.debug(" Non-HTTP Include");
request.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR,
Integer.valueOf(ApplicationFilterFactory.INCLUDE));
request.setAttribute(
// Handle an HTTP named dispatcher include
else if (name != null) {
- if ( log.isDebugEnabled() )
- log.debug(" Named Dispatcher Include");
-
ApplicationHttpRequest wrequest =
(ApplicationHttpRequest) wrapRequest(state);
wrequest.setAttribute(Globals.NAMED_DISPATCHER_ATTR, name);
// Handle an HTTP path based include
else {
- if ( log.isDebugEnabled() )
- log.debug(" Path Based Include");
-
ApplicationHttpRequest wrequest =
(ApplicationHttpRequest) wrapRequest(state);
String contextPath = context.getPath();
if (filterChain != null)
filterChain.release();
} catch (Throwable e) {
- log.error(sm.getString("standardWrapper.releaseFilters",
+ wrapper.getLogger().error(sm.getString("standardWrapper.releaseFilters",
wrapper.getName()), e);
- //FIXME Exception handling needs to be simpiler to what is in the StandardWrapperValue
+ // FIXME: Exception handling needs to be simpiler to what is in the StandardWrapperValue
}
// Deallocate the allocated servlet instance