@Override protected void setHeaders(WebResponse aResponse) { super.setHeaders(aResponse); behaviors.setHeaders(this, aResponse); }
/** * @see org.apache.wicket.Page#configureResponse() */ protected void configureResponse() { super.configureResponse(); if (getWebRequestCycle().getResponse() instanceof WebResponse) { final WebResponse response = getWebRequestCycle().getWebResponse(); setHeaders(response); } }
/** * @see org.apache.wicket.Page#configureResponse() */ @Override protected void configureResponse() { super.configureResponse(); if (getWebRequestCycle().getResponse() instanceof WebResponse) { final WebResponse response = getWebRequestCycle().getWebResponse(); setHeaders(response); } }
/** * Set-up response with appropriate content type, locale and encoding. The locale is set equal * to the session's locale. The content type header contains information about the markup type * (@see #getMarkupType()) and the encoding. The response (and request) encoding is determined * by an application setting (@see ApplicationSettings#getResponseRequestEncoding()). If null, * no xml decl will be written. * * @param response * The WebResponse object */ protected void configureResponse(final WebResponse response) { // Users may subclass setHeader() to set there own headers setHeaders(response); // The response encoding is an application setting final String encoding = getApplication().getRequestCycleSettings() .getResponseRequestEncoding(); final boolean validEncoding = (Strings.isEmpty(encoding) == false); final String contentType; if (validEncoding) { contentType = getMarkupType().getMimeType() + "; charset=" + encoding; } else { contentType = getMarkupType().getMimeType(); } response.setContentType(contentType); }
/** * Set-up response with appropriate content type, locale and encoding. The locale is set equal * to the session's locale. The content type header contains information about the markup type * (@see #getMarkupType()) and the encoding. The response (and request) encoding is determined * by an application setting (@see ApplicationSettings#getResponseRequestEncoding()). If null, * no xml decl will be written. * * @param response * The WebResponse object */ protected void configureResponse(final WebResponse response) { // Users may subclass setHeader() to set there own headers setHeaders(response); // The response encoding is an application setting final String encoding = getApplication().getRequestCycleSettings() .getResponseRequestEncoding(); final boolean validEncoding = (Strings.isEmpty(encoding) == false); final String contentType; if (validEncoding) { contentType = getMarkupType().getMimeType() + "; charset=" + encoding; } else { contentType = getMarkupType().getMimeType(); } response.setContentType(contentType); }