@Override public void addCookie(Cookie cookie) { responseState.addCookie(cookie); }
@Override public void addDateHeader(String name, long date) { responseState.addDateHeader(name, date); }
public void addHeadElement(Element element, String keyHint) { this.responseState.addHeadElement(element, keyHint); }
if (!requestContext.isPortletContext()) { for (HstComponentWindow window : sortedComponentWindows) { if (window.getResponseState().getRedirectLocation() != null) { redirectLocation = window.getResponseState().getRedirectLocation(); break; String forwardPathInfo = rootWindow.getResponseState().getForwardPathInfo(); if (rootWindow.getResponseState().getRedirectLocation() != null) { redirectLocation = rootWindow.getResponseState().getRedirectLocation(); if (rootWindow.getResponseState().getForwardPathInfo() != null) { forwardPathInfo = rootWindow.getResponseState().getForwardPathInfo(); int errorCode = errorCodeSendingWindow.getResponseState().getErrorCode(); String errorMessage = errorCodeSendingWindow.getResponseState().getErrorMessage(); String componentClassName = errorCodeSendingWindow.getComponentInfo().getComponentClassName(); for (int i = sortedComponentWindows.length - 1; i >= 0; i--) { HstComponentWindow window = sortedComponentWindows[i]; window.getResponseState().flush(); rootWindow.getResponseState().addHeader("X-HST-VERSION", HstServices.getImplementationVersion()); rootWindow.getResponseState().flush(); } catch (Exception e) { if (log.isDebugEnabled()) {
if (window.getResponseState().getRedirectLocation() != null) { redirectLocation = window.getResponseState().getRedirectLocation(); break; String forwardPathInfo = rootWindow.getResponseState().getForwardPathInfo(); if (rootWindow.getResponseState().getRedirectLocation() != null) { redirectLocation = rootWindow.getResponseState().getRedirectLocation(); if (rootWindow.getResponseState().getForwardPathInfo() != null) { forwardPathInfo = rootWindow.getResponseState().getForwardPathInfo(); int errorCode = errorCodeSendingWindow.getResponseState().getErrorCode(); String errorMessage = errorCodeSendingWindow.getResponseState().getErrorMessage(); String componentClassName = errorCodeSendingWindow.getComponentName(); log.debug("The component window has error status code, {} from {}.", errorCode, componentClassName); window.getResponseState().flush(true); if (HttpServletResponse.SC_MOVED_PERMANENTLY == rootWindow.getResponseState().getStatus()) { permanent = true;
if (pageErrors != null) { PageErrorHandler.Status handled = handleComponentExceptions(pageErrors, context.getRequestContainerConfig(), window, request, response); String location = responseState.getRedirectLocation(); if (handled == PageErrorHandler.Status.HANDLED_TO_STOP && location == null) { return; urlProvider.mergeParameters(baseURL, referenceNamespace, renderParameters); if (responseState.getErrorCode() > 0) { try { int errorCode = responseState.getErrorCode(); String errorMessage = responseState.getErrorMessage(); String componentClassName = window.getComponentName(); if (responseState.getRedirectLocation() == null) { try { responseState.sendRedirect(urlProvider.toURLString(baseURL, requestContext, null)); } catch (UnsupportedEncodingException e) { throw new ContainerException(e); responseState.flush(); String location = responseState.getRedirectLocation(); log.warn("Unexpected exception during redirect to " + responseState.getRedirectLocation(), e);
public void flushChildContent(String name) throws IOException { HstComponentWindow childWindow = this.componentWindow.getChildWindow(name); if (childWindow != null) { childWindow.getResponseState().flush(); } }
@Override public void addHeader(String name, String value) { responseState.addHeader(name, value); }
public Element createElement(String tagName) { Element element = null; if (this.topParentHstResponse != null) { element = this.topParentHstResponse.createElement(tagName); } else { element = this.responseState.createElement(tagName); } return element; }
@Override public boolean containsHeader(String name) { return responseState.containsHeader(name); }
public boolean containsHeadElement(String keyHint) { boolean contained = false; if (this.topParentHstResponse == null) { contained = this.responseState.containsHeadElement(keyHint); } else if (this != this.topParentHstResponse) { contained = this.topParentHstResponse.containsHeadElement(keyHint); } return contained; }
@Override public void addIntHeader(String name, int value) { responseState.addIntHeader(name, value); }
@Override public void flushBuffer() throws IOException { responseState.flushBuffer(); }
if (pageErrors != null) { PageErrorHandler.Status handled = handleComponentExceptions(pageErrors, context.getRequestContainerConfig(), window, request, response); String location = responseState.getRedirectLocation(); if (handled == PageErrorHandler.Status.HANDLED_TO_STOP && location == null) { context.invokeNext(); if (responseState.getErrorCode() > 0) { try { int errorCode = responseState.getErrorCode(); String errorMessage = responseState.getErrorMessage(); String componentClassName = window.getComponentInfo().getComponentClassName(); if (responseState.getRedirectLocation() == null) { try { responseState.sendRedirect(urlProvider.toContextRelativeURLString(baseURL, requestContext)); } else { responseState.sendRedirect(urlProvider.toURLString(baseURL, requestContext, null)); responseState.flush(); String location = responseState.getRedirectLocation(); String location = responseState.getRedirectLocation(); if (!(location.startsWith("http:") || location.startsWith("https:"))) { if (!location.startsWith("/")) { log.warn("Unexpected exception during redirect to " + responseState.getRedirectLocation(), e);
public void flushChildContent(String name, Writer writer) throws IOException { HstComponentWindow childWindow = this.componentWindow.getChildWindow(name); if (childWindow == null) { log.debug("Cannot find child window with name '{}' for current window '{}'. Skip child.", name, this.componentWindow.getName()); } else { childWindow.getResponseState().flush(writer); } }
@Override public void addHeader(String name, String value) { responseState.addHeader(name, value); }
public Element createElement(String tagName) { Element element = null; if (this.topParentHstResponse != null) { element = this.topParentHstResponse.createElement(tagName); } else { element = this.responseState.createElement(tagName); } return element; }
@Override public boolean containsHeader(String name) { return responseState.containsHeader(name); }
public boolean containsHeadElement(String keyHint) { boolean contained = false; if (this.topParentHstResponse == null) { contained = this.responseState.containsHeadElement(keyHint); } else if (this != this.topParentHstResponse) { contained = this.topParentHstResponse.containsHeadElement(keyHint); } return contained; }
@Override public void addIntHeader(String name, int value) { responseState.addIntHeader(name, value); }