Package org.apache.roller.presentation

Examples of org.apache.roller.presentation.PlanetRequest


        mLogger.debug("entering");
       
        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) res;
       
        PlanetRequest planetRequest = null;
        try {
            planetRequest = new PlanetRequest(request);
        } catch(Exception e) {
            // some kind of error parsing the request
            mLogger.error("error creating planet request", e);
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
       
        String key = "planetCache:"+this.generateKey(planetRequest);
       
        try {
            ResponseContent respContent = null;
            if(!this.excludeOwnerPages || !planetRequest.isLoggedIn()) {
                respContent = (ResponseContent) this.mCache.get(key);
            }
           
            if(respContent == null) {

                mLogger.debug("MISS "+key);
                this.misses++;
               
                CacheHttpServletResponseWrapper cacheResponse =
                        new CacheHttpServletResponseWrapper(response);
               
                chain.doFilter(request, cacheResponse);
               
                cacheResponse.flushBuffer();
               
                // only cache if we didn't get an exception
                if (request.getAttribute("DisplayException") == null) {
                    ResponseContent rc = cacheResponse.getContent();
                   
                    // only cache if this is not a logged in user?
                    if(!this.excludeOwnerPages || !planetRequest.isLoggedIn()) {
                        this.mCache.put(key, rc);
                    } else {
                        mLogger.debug("SKIPPED "+key);
                        this.skips++;
                    }
View Full Code Here


            throws IOException, ServletException {
       
        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) res;
       
        PlanetRequest planetRequest = null;
        try {
            planetRequest = new PlanetRequest(request);
        } catch(Exception e) {
            mLogger.error("error creating planet request", e);
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
View Full Code Here

TOP

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

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.