Code example for Writer

Methods: write

0
        throws IOException 
    { 
        if (message == null)
            message=HttpGenerator.getReason(code);
 
        writer.write("<html>\n<head>\n");
        writeErrorPageHead(request,writer,code,message);
        writer.write("</head>\n<body>");
        writeErrorPageBody(request,writer,code,message,showStacks);
        writer.write("\n</body>\n</html>\n");
    } 
 
    /* ------------------------------------------------------------ */ 
    protected void writeErrorPageHead(HttpServletRequest request, Writer writer, int code, String message)
        throws IOException 
    { 
        writer.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\"/>\n");
        writer.write("<title>Error ");
        writer.write(Integer.toString(code));
        writer.write(' ');
        write(writer,message);