} catch (ClassCastException e) {
throw new ServletException(e.getMessage());
}
if (initok) {
Request request = null;
try {
request = new BServletRequest(server, httpReq, httpRes);
} catch (UnknownHostException e) {
throw new ServletException("UnknownHostException: " + e.getMessage());
}
// So the log file reports the port accurately
((BServletServerSocket)socket).setLocalPort(req.getServerPort());
if (request.getRequest()) {
request.props.put("context_path", httpReq.getContextPath());
{
String s = httpReq.getServletPath();
if (s != null && s.length() != 0)
server.log(Server.LOG_WARNING, null, "Servlet path is "
+ s + " -- not an empty string. Possible "
+ "URL mapping error.");
request.props.put("servlet_path", s);
if ((s = httpReq.getPathInfo()) == null)
s = "";
request.props.put("path_info", s);
}
request.props.put("servlet_container",
getServletContext().getServerInfo());
server.requestCount++;
if (server.handler.respond(request) == false) {
request.sendError(404, null, request.url);
}
server.log(Server.LOG_INFORMATIONAL, null, "request done");
}
try {
request.out.close();