// request in scope notify
ServletRequestListener reqLsnrs[] = webAppConfig.getRequestListeners();
for (int n = 0; n < reqLsnrs.length; n++) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(webAppConfig.getLoader());
reqLsnrs[n].requestInitialized(new ServletRequestEvent(webAppConfig, req));
Thread.currentThread().setContextClassLoader(cl);
}
// Lookup a dispatcher, then process with it
processRequest(webAppConfig, req, rsp,
webAppConfig.getServletURIFromRequestURI(servletURI));
writeToAccessLog(servletURI, req, rsp, webAppConfig);
this.outData.finishResponse();
this.inData.finishRequest();
Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
"RequestHandlerThread.FinishRequest",
"" + requestId);
// Process keep-alive
continueFlag = this.listener.processKeepAlive(req, rsp, inSocket);
// Set last accessed time on session as start of this
// request
req.markSessionsAsRequestFinished(this.requestStartTime, this.saveSessions);
// send request listener notifies
for (int n = 0; n < reqLsnrs.length; n++) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(webAppConfig.getLoader());
reqLsnrs[n].requestDestroyed(new ServletRequestEvent(webAppConfig, req));
Thread.currentThread().setContextClassLoader(cl);
}
req.setWebAppConfig(null);
rsp.setWebAppConfig(null);