Package org.apache.ecs

Examples of org.apache.ecs.Document.output()


            Document document = new Document()
                .setDoctype(new Doctype.Html40Transitional())
                .setHtml(new Html().addElement(head).addElement(body));

            document.output(out);
        } catch(Exception e) {
            out.println("<html><body><h3>Fatal error generating navigation frame content</h3><pre>"
                    + Utils.getStackTrace(e) + "</pre></body></html>");
        } finally {
            if(out != null)
View Full Code Here


                        "if (top.location != location) top.location.href = document.location.href;")
                        .setLanguage("JavaScript")
                        )).addElement(
                    frameset).addElement(noframes));
           
            document.output(out);
        } catch(Exception e) {
            out.println("<html><body><h3>FATAL ERROR</h3><pre>" + Utils.getStackTrace(e)
                    + "</pre></body></html>");
        } finally {
            if(out != null)
View Full Code Here

                .addElement(body));

        res.setContentType("text/html");
        PrintWriter out = res.getWriter();
        try {
            document.output(out);
        } catch(Exception e) {
            Environment.getInstance().log("Exception in login", e);
        } finally {
            if(out != null) {
                out.flush();
View Full Code Here

        Document doc = new Document().setDoctype(new Doctype.Html40Transitional()).setHtml(
            new Html().addElement(head).addElement(
                body.addElement(tabGenerator.getTabSet(tabSetId, tabId, new ElementContainer()
                    .addElement(content), MENU_FILE, standaloneZones, lang))));
        doc.output(out);
    }

    public void outputErrorPage(Throwable e, PrintWriter out) {
        Body body = getBody();
        body.addElement(new H1("ERROR!")).addElement(new PRE().addElement(Utils.getStackTrace(e))
View Full Code Here

            );

        Document doc = new Document().setDoctype(new Doctype.Html40Transitional()).setHtml(
            new Html().addElement(new Head()).addElement(body));

        doc.output(out);
    }


    public void log(String message) {
        if(logger != null)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.