/** * Set caching status for this response.<p> * * Will always be set to <code>"true"</code> if setOnlyBuffering() is set to <code>"true"</code>. * Currently this is an optimization for non - JSP elements that * are known not to be cachable.<p> * * @param value the value to set */ void setCmsCachingRequired(boolean value) { m_cachingRequired = (value || m_writeOnlyToBuffer) && !m_controller.isForwardMode(); }
/** * Set caching status for this response.<p> * * Will always be set to <code>"true"</code> if setOnlyBuffering() is set to <code>"true"</code>. * Currently this is an optimization for non - JSP elements that * are known not to be cachable.<p> * * @param value the value to set */ void setCmsCachingRequired(boolean value) { m_cachingRequired = (value || m_writeOnlyToBuffer) && !m_controller.isForwardMode(); }
/** * Sets buffering status of the response.<p> * * This must be done before the first output is written. * Buffering is needed to process elements that can not be written * directly to the output stream because their sub - elements have to * be processed separately. Which is so far true only for JSP pages.<p> * * If buffering is on, nothing is written to the output stream * even if streaming for this response is enabled.<p> * * @param value the value to set */ public void setOnlyBuffering(boolean value) { m_writeOnlyToBuffer = value && !m_controller.isForwardMode(); if (m_writeOnlyToBuffer) { setCmsCachingRequired(true); } }
/** * Sets buffering status of the response.<p> * * This must be done before the first output is written. * Buffering is needed to process elements that can not be written * directly to the output stream because their sub - elements have to * be processed separately. Which is so far true only for JSP pages.<p> * * If buffering is on, nothing is written to the output stream * even if streaming for this response is enabled.<p> * * @param value the value to set */ public void setOnlyBuffering(boolean value) { m_writeOnlyToBuffer = value && !m_controller.isForwardMode(); if (m_writeOnlyToBuffer) { setCmsCachingRequired(true); } }
/** * Constructor for the CmsFlexResponse, * this variation is usually used for the "top" response.<p> * * @param res the HttpServletResponse to wrap * @param controller the controller to use * @param streaming indicates if streaming should be enabled or not * @param isTopElement indicates if this is the top element of an include cascade */ public CmsFlexResponse( HttpServletResponse res, CmsFlexController controller, boolean streaming, boolean isTopElement) { super(res); m_res = res; m_controller = controller; m_encoding = controller.getCmsObject().getRequestContext().getEncoding(); m_isTopElement = isTopElement; m_parentWritesOnlyToBuffer = !streaming && !controller.isForwardMode(); setOnlyBuffering(m_parentWritesOnlyToBuffer); m_headers = new HashMap<String, List<String>>(16); m_bufferHeaders = new HashMap<String, List<String>>(8); }
/** * Constructor for the CmsFlexResponse, * this variation is usually used for the "top" response.<p> * * @param res the HttpServletResponse to wrap * @param controller the controller to use * @param streaming indicates if streaming should be enabled or not * @param isTopElement indicates if this is the top element of an include cascade */ public CmsFlexResponse( HttpServletResponse res, CmsFlexController controller, boolean streaming, boolean isTopElement) { super(res); m_res = res; m_controller = controller; m_encoding = controller.getCmsObject().getRequestContext().getEncoding(); m_isTopElement = isTopElement; m_parentWritesOnlyToBuffer = !streaming && !controller.isForwardMode(); setOnlyBuffering(m_parentWritesOnlyToBuffer); m_headers = new HashMap(16); m_bufferHeaders = new HashMap(8); }
/** * Constructor for the CmsFlexResponse, * this variation one is usually used to wrap responses for further include calls in OpenCms.<p> * * @param res the CmsFlexResponse to wrap * @param controller the controller to use */ public CmsFlexResponse(HttpServletResponse res, CmsFlexController controller) { super(res); m_res = res; m_controller = controller; m_encoding = controller.getCurrentResponse().getEncoding(); m_isTopElement = controller.getCurrentResponse().isTopElement(); m_parentWritesOnlyToBuffer = controller.getCurrentResponse().hasIncludeList() && !controller.isForwardMode(); setOnlyBuffering(m_parentWritesOnlyToBuffer); m_headers = new HashMap<String, List<String>>(16); m_bufferHeaders = new HashMap<String, List<String>>(8); }
/** * Constructor for the CmsFlexResponse, * this variation one is usually used to wrap responses for further include calls in OpenCms.<p> * * @param res the CmsFlexResponse to wrap * @param controller the controller to use */ public CmsFlexResponse(HttpServletResponse res, CmsFlexController controller) { super(res); m_res = res; m_controller = controller; m_encoding = controller.getCurrentResponse().getEncoding(); m_isTopElement = controller.getCurrentResponse().isTopElement(); m_parentWritesOnlyToBuffer = controller.getCurrentResponse().hasIncludeList() && !controller.isForwardMode(); setOnlyBuffering(m_parentWritesOnlyToBuffer); m_headers = new HashMap(16); m_bufferHeaders = new HashMap(8); }
if (bypass || controller.isForwardMode()) { if (!controller.isForwardMode()) { CmsFlexController.removeController(req);
try { lock.lock(); if (bypass || controller.isForwardMode()) { if (!controller.isForwardMode()) { CmsFlexController.removeController(req);
} else if (controller.isForwardMode()) { includeInternalNoCache(req, res, controller, controller.getCmsObject(), resource); } else {
} else if (controller.isForwardMode()) { includeInternalNoCache(req, res, controller, controller.getCmsObject(), resource); } else {
CmsFlexResponse f_res = new CmsFlexResponse(res, controller, streaming, true); controller.push(f_req, f_res); } else if (controller.isForwardMode()) {
CmsFlexResponse f_res = new CmsFlexResponse(res, controller, streaming, true); controller.push(f_req, f_res); } else if (controller.isForwardMode()) {
CmsFlexResponse f_res = new CmsFlexResponse(res, controller, streaming, true); controller.push(f_req, f_res); } else if (controller.isForwardMode()) {
w_res.setCmsCachingRequired(!controller.isForwardMode() && (variation != null));
w_res.setCmsCachingRequired(!controller.isForwardMode() && (variation != null));