int code = HttpServletResponse.SC_SERVICE_UNAVAILABLE;
FilterChain chain = new ErrorFilterChain(code);
invocation.setFilterChain(chain);
if (_dispatchServer instanceof Server) {
Server server = (Server) _dispatchServer;
invocation.setWebApp(getErrorWebApp());
}
invocation.setDependency(AlwaysModified.create());
return invocation ;
}
FilterChain chain;
WebApp app = getWebApp(invocation, true);
boolean isAlwaysModified;
if (app != null) {
invocation = app.buildInvocation(invocation);
chain = invocation.getFilterChain();
isAlwaysModified = false;
}
else {
int code = HttpServletResponse.SC_NOT_FOUND;
chain = new ErrorFilterChain(code);
ContextFilterChain contextChain = new ContextFilterChain(chain);
contextChain.setErrorPageManager(_errorPageManager);
chain = contextChain;
invocation.setFilterChain(contextChain);
isAlwaysModified = true;
}
if (_rewriteDispatch != null) {
String uri = invocation.getURI();
String queryString = invocation.getQueryString();
FilterChain rewriteChain = _rewriteDispatch.map(uri,
queryString,
chain);
if (rewriteChain != chain) {
Server server = (Server) _dispatchServer;
// server/13sf, server/1kq1
WebApp webApp = findWebAppByURI("/");
if (webApp != null)
invocation.setWebApp(webApp);