}
else if (! _lifecycle.waitForActive(_startWaitTime)) {
log.fine(this + " container is not active");
int code = HttpServletResponse.SC_SERVICE_UNAVAILABLE;
FilterChain chain = new ErrorFilterChain(code);
invocation.setFilterChain(chain);
invocation.setWebApp(getErrorWebApp());
invocation.setDependency(AlwaysModified.create());
return invocation ;
}
FilterChain chain;
WebAppController controller = getWebAppController(invocation);
WebApp webApp = getWebApp(invocation, controller, true);
boolean isAlwaysModified;
if (webApp != null) {
invocation = webApp.buildInvocation(invocation);
chain = invocation.getFilterChain();
isAlwaysModified = false;
}
else if (controller != null){
int code = HttpServletResponse.SC_SERVICE_UNAVAILABLE;
chain = new ErrorFilterChain(code);
ContextFilterChain contextChain = new ContextFilterChain(chain);
contextChain.setErrorPageManager(getErrorPageManager());
chain = contextChain;
invocation.setFilterChain(contextChain);
isAlwaysModified = true;
}
else {
int code = HttpServletResponse.SC_NOT_FOUND;
chain = new ErrorFilterChain(code);
ContextFilterChain contextChain = new ContextFilterChain(chain);
contextChain.setErrorPageManager(getErrorPageManager());
chain = contextChain;
invocation.setFilterChain(contextChain);
isAlwaysModified = true;