response.setStatus(HttpServletResponse.SC_OK);
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException    {        if (response.isCommitted() || HttpConnection.getCurrentConnection().getRequest().isHandled())            return;                String method=request.getMethod();        // little cheat for common request        if (_serveIcon && _favicon!=null && method.equals(HttpMethods.GET) && request.getRequestURI().equals("/favicon.ico"))        {            if (request.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE)==_faviconModified)                response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);            else            {                response.setStatus(HttpServletResponse.SC_OK);                response.setContentType("image/x-icon");                response.setContentLength(_favicon.length);                response.setDateHeader(HttpHeaders.LAST_MODIFIED, _faviconModified);                response.getOutputStream().write(_favicon);            }            return;        }                        if (!method.equals(HttpMethods.GET) || !request.getRequestURI().equals("/"))        {            response.sendError(HttpServletResponse.SC_OK);            return;           }        response.setStatus(HttpServletResponse.SC_OK);        response.setContentType(MimeTypes.TEXT_HTML);                ByteArrayISO8859Writer writer = new ByteArrayISO8859Writer(1500);        String uri=request.getRequestURI();        uri=StringUtil.replace(uri,"<","&lt;");        uri=StringUtil.replace(uri,">","&gt;");                writer.write("<HTML>\n<HEAD>\n<TITLE>Error 404 - Not Found");        writer.write("</TITLE>\n<BODY>\n<H2>Error 404 - Not Found.</H2>\n");        writer.write("No context on this server matched or handled this request.<BR>");        writer.write("Contexts known to this server are: <ul>");        Server server = getServer();        Handler[] handlers = server==null?null:server.getChildHandlersByClass(ContextHandler.class);         for (int i=0;handlers!=null && i<handlers.length;i++)        {            ContextHandler context = (ContextHandler)handlers[i];            if (context.isRunning())            {                writer.write("<li><a href=\"");                writer.write(context.getContextPath());                writer.write("/\">");                writer.write(context.getContextPath());                writer.write("&nbsp;--->&nbsp;");                writer.write(context.toString());                writer.write("</a></li>\n");            }            else            {                writer.write("<li>");                writer.write(context.getContextPath());                writer.write("&nbsp;--->&nbsp;");                writer.write(context.toString());                writer.write(" [stopped]");                writer.write("</li>\n");            }        }                writer.write("</ul><small><I>The links above may not work if a virtual host is configured</I></small>");                for (int i=0;i<10;i++)            writer.write("\n<!-- Padding for IE                  -->");                writer.write("\n</BODY>\n</HTML>\n");        writer.flush();        response.setContentLength(writer.size());        OutputStream out=response.getOutputStream();        writer.writeTo(out);        out.close();                return;    }