/** * Sends an error response to the client using the specified status * code and descriptive message. If setStatus has previously been * called, it is reset to the error status code. The message is * sent as the body of an HTML page, which is returned to the user * to describe the problem. The page is sent with a default HTML * header; the message is enclosed in simple body tags * (<body></body>). **/ public void sendError(int sc, String msg) throws IOException { setStatus( sc ); _statusMessage = msg; _writer = null; _servletStream = null; setContentType( "text/html" ); getWriter().println( "<html><head><title>" + msg + "</title></head><body>" + msg + "</body></html>" ); }
/** * Sends an error response to the client using the specified status * code and descriptive message. If setStatus has previously been * called, it is reset to the error status code. The message is * sent as the body of an HTML page, which is returned to the user * to describe the problem. The page is sent with a default HTML * header; the message is enclosed in simple body tags * (<body></body>). **/ public void sendError(int sc, String msg) throws IOException { setStatus( sc ); _statusMessage = msg; _writer = null; _servletStream = null; setContentType( "text/html" ); getWriter().println( "<html><head><title>" + msg + "</title></head><body>" + msg + "</body></html>" ); }
/** * Sends an error response to the client using the specified status * code and descriptive message. If setStatus has previously been * called, it is reset to the error status code. The message is * sent as the body of an HTML page, which is returned to the user * to describe the problem. The page is sent with a default HTML * header; the message is enclosed in simple body tags * (<body></body>). **/ public void sendError(int sc, String msg) throws IOException { setStatus( sc ); _statusMessage = msg; _writer = null; _servletStream = null; setContentType( "text/html" ); getWriter().println( "<html><head><title>" + msg + "</title></head><body>" + msg + "</body></html>" ); }