@Override protected void configureResponse(WebResponse response) { super.configureResponse(response); response.setStatus(HttpServletResponse.SC_FORBIDDEN); } }
@Override protected void configureResponse(WebResponse response) { super.configureResponse(response); response.setStatus(HttpServletResponse.SC_NOT_FOUND); } }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_FORBIDDEN); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ @Override protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_NOT_FOUND); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ @Override protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_FORBIDDEN); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ @Override protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_NOT_FOUND); }
@Override protected void configureResponse() { super.configureResponse(); // this is to avoid https://issues.apache.org/jira/browse/WICKET-923 in Firefox final WebResponse response = getWebRequestCycle().getWebResponse(); response.setHeader("Cache-Control", "no-cache, max-age=0, must-revalidate, no-store"); }
@Override protected void onRender() { // Configure the response such as headers etc. configureResponse((WebResponse)RequestCycle.get().getResponse()); // The rules if and when to insert an xml decl in the response are a bit tricky. Allow the // user to replace the default per page and per application. renderXmlDecl(); super.onRender(); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ protected void configureResponse() { super.configureResponse(); if (getWebRequestCycle().getResponse() instanceof WebResponse) { getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ @Override protected void configureResponse() { super.configureResponse(); if (getWebRequestCycle().getResponse() instanceof WebResponse) { getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } }
@Override protected void onRender() { // Configure the response such as headers etc. configureResponse((WebResponse)RequestCycle.get().getResponse()); // The rules if and when to insert an xml decl in the response are a bit tricky. Allow the // user to replace the default per page and per application. renderXmlDecl(); super.onRender(); }
@Override protected void configureResponse(final WebResponse response) { super.configureResponse(response); if (doAuthentication) { WebRequest request = (WebRequest)RequestCycle.get().getRequest(); String auth = request.getHeader("Authorization"); if (Strings.isEmpty(auth)) requestAuthentication(request, response); else { int index = auth.indexOf(' '); if (index < 1) requestAuthentication(request, response); String type = auth.substring(0, index); try { handleAuthentication(request, response, type, auth.substring(index + 1)); } catch (LoginException e) { log.error(type + " Http authentication failed", e); error(e); requestAuthentication(request, response); } } } }
@Override protected void configureResponse(final WebResponse response) { super.configureResponse(response); if (doAuthentication) { WebRequest request = (WebRequest)RequestCycle.get().getRequest(); String auth = request.getHeader("Authorization"); if (Strings.isEmpty(auth)) requestAuthentication(request, response); else { int index = auth.indexOf(' '); if (index < 1) requestAuthentication(request, response); String type = auth.substring(0, index); try { handleAuthentication(request, response, type, auth.substring(index + 1)); } catch (LoginException e) { log.error(type + " Http authentication failed", e); error(e); requestAuthentication(request, response); } } } }
@Override protected void configureResponse(WebResponse response) { super.configureResponse(response); String mimeType = getMimeType(getModelObject()); String encoding = Application.get().getRequestCycleSettings().getResponseRequestEncoding(); ((WebResponse) getResponse()).setContentType(mimeType + "; charset=" + encoding); // TODO figure out how to handle last modified for pages. // lastmodified depends on both the page and the tiles, maybe tiles // can contribute lastmodified dates and we take the latest... // response.setLastModifiedTime(Time.valueOf(node.getObject().getLastModified())); }