/** * Construct. * * @param originalResponse */ public AjaxResponse(Response originalResponse) { super(((WebResponse)originalResponse).getHttpServletResponse()); this.originalResponse = originalResponse; setAjax(true); }
/** * Construct. * * @param originalResponse */ public AjaxResponse(Response originalResponse) { super(((WebResponse)originalResponse).getHttpServletResponse()); this.originalResponse = originalResponse; setAjax(true); }
/** * Retrieves the last-modified value from the response header. * * @return the last-modified value from the response header */ public String getLastModifiedFromResponseHeader() { return ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Last-Modified"); }
/** * Retrieves the content disposition from the response header. * * @return the content disposition from the response header */ public String getContentDispositionFromResponseHeader() { return ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Disposition"); }
@Override protected void onExceptionLoop(RuntimeException e) { super.onExceptionLoop(e); try { getWebResponse().getHttpServletResponse().sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null); } catch (IOException e1) { // ignore } }
/** * Retrieves the content disposition from the response header. * * @return the content disposition from the response header */ public String getContentDispositionFromResponseHeader() { return ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Disposition"); }
/** * Retrieves the last-modified value from the response header. * * @return the last-modified value from the response header */ public String getLastModifiedFromResponseHeader() { return ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Last-Modified"); }
/** * @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); }
/** * @see org.apache.wicket.markup.html.WebPage#configureResponse() */ protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR); }
/** * Retrieves the content length from the response header. * * @return the content length from the response header */ public int getContentLengthFromResponseHeader() { String contentLength = ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Length"); if (contentLength == null) { throw new WicketRuntimeException("No Content-Length header found"); } return Integer.parseInt(contentLength); }
/** * Retrieves the content length from the response header. * * @return the content length from the response header */ public int getContentLengthFromResponseHeader() { String contentLength = ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Length"); if (contentLength == null) { throw new WicketRuntimeException("No Content-Length header found"); } return Integer.parseInt(contentLength); }
/** * Retrieves the content type from the response header. * * @return the content type from the response header */ public String getContentTypeFromResponseHeader() { String contentType = ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Type"); if (contentType == null) { throw new WicketRuntimeException("No Content-Type header found"); } return contentType; }
/** * Retrieves the content type from the response header. * * @return the content type from the response header */ public String getContentTypeFromResponseHeader() { String contentType = ((MockHttpServletResponse)getWicketResponse().getHttpServletResponse()).getHeader("Content-Type"); if (contentType == null) { throw new WicketRuntimeException("No Content-Type header found"); } return contentType; }
/** * @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); } }
/** * @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); } }
public void respond(RequestCycle requestCycle) { try { HttpServletRequest request = new CocoonWicketRequestWrapper(((WebRequest) requestCycle.getRequest()) .getHttpServletRequest()); this.requestProcessor.service(request, ((WebResponse) requestCycle.getResponse()).getHttpServletResponse()); } catch (NoMatchingPipelineException e) { WebApplication.get().getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); RequestCycle.get().setRequestTarget(new WebErrorCodeResponseTarget(404)); } catch (Exception e) { throw new CocoonRuntimeException("Error occurred while executing a Cocoon sitemap.", e); } }