Package net.sourceforge.stripes.exception

Examples of net.sourceforge.stripes.exception.SourcePageNotFoundException


        return context;
    }

    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
        // log an exception for the stack trace
        SourcePageNotFoundException exception = new SourcePageNotFoundException(getContext());
        log.error(exception);

        // start the HTML error report
        response.setContentType("text/html");
        PrintWriter writer = response.getWriter();
        writer.println("<div style=\"font-family: Arial, sans-serif; font-size: 10pt;\">");
        writer.println("<h1>Stripes validation error report</h1><p>");
        writer.println(HtmlUtil.encode(exception.getMessage()));
        writer.println("</p><h2>Validation errors</h2><p>");
        sendErrors(request, response);
        writer.println("</p></div>");
    }
View Full Code Here


     * @see #getSourcePage()
     */
    public Resolution getSourcePageResolution() throws SourcePageNotFoundException {
        String sourcePage = getSourcePage();
        if (sourcePage == null) {
            throw new SourcePageNotFoundException(this);
        }
        else {
            return new ForwardResolution(sourcePage);
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.exception.SourcePageNotFoundException

Copyright © 2018 www.massapicom. 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.