Package org.apache.roller.presentation

Examples of org.apache.roller.presentation.WeblogRequest


                                HttpServletResponse response,
                                Context ctx)
            throws IOException {
       
        Template template = null;
        WeblogRequest weblogRequest = null;
        WebsiteData weblog = null;
       
        // first off lets parse the incoming request and validate it
        try {
            weblogRequest = new WeblogRequest(request);
           
            // now make sure the specified weblog really exists
            UserManager userMgr = RollerFactory.getRoller().getUserManager();
            weblog = userMgr.getWebsiteByHandle(weblogRequest.getWeblogHandle(), Boolean.TRUE);
           
        } catch(InvalidRequestException ire) {
            // An error initializing the request is considered to be a 404
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            request.setAttribute("DisplayException", ire);
            mLogger.error("Bad Request: "+ire.getMessage());
           
            return null;
           
        } catch(RollerException re) {
            // error looking up the weblog, we assume it doesn't exist
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            request.setAttribute("DisplayException", re);
            mLogger.warn("Unable to lookup weblog ["+
                    weblogRequest.getWeblogHandle()+"] "+re.getMessage());
           
            return null;
        }
       
       
View Full Code Here

TOP

Related Classes of org.apache.roller.presentation.WeblogRequest

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.