@Override public Object getContainerResponse() { return original.getContainerResponse(); } }
@Override public Object getContainerResponse() { return original.getContainerResponse(); } }
public static HttpServletResponse getHttpServletResponse(final Response response) { return (HttpServletResponse) response.getContainerResponse(); }
public static HttpServletResponse getHttpServletResponse(Response response) { Object cr = response != null ? response.getContainerResponse() : null; return cr instanceof HttpServletResponse ? (HttpServletResponse) cr : null; }
public static void setCharacterEncoding(final Response response, final String encoding) { final Object cresp = response.getContainerResponse(); if (cresp instanceof HttpServletResponse) { ((HttpServletResponse) cresp).setCharacterEncoding(encoding); } else { log.warn("Character encoding not supported for response of type: " + response.getClass()); } }
public Map<String, Object> getData(final List<TimesheetDO> timeSheets, final Integer taskId, final Request request, final Response response, final TimesheetFilter actionFilter) { return getData(timeSheets, taskId, (HttpServletRequest) request.getContainerRequest(), (HttpServletResponse) response.getContainerResponse(), actionFilter); }
public static HttpServletResponse getHttpServletResponse() { return (HttpServletResponse) ThreadContext.getRequestCycle().getResponse().getContainerResponse(); }
protected Page mapExceptions(Exception e) { HttpServletResponse response = (HttpServletResponse) RequestCycle.get().getResponse().getContainerResponse(); if (!response.isCommitted()) return new ErrorPage(e); else return null; }
public final void respond(final Attributes attributes) { Response response = attributes.getResponse(); HttpServletResponse containerResponse = (HttpServletResponse) response.getContainerResponse(); EventSource eventSource = new EventSource(containerResponse, attributes.getParameters()); respond(eventSource); }
try { if (node == null) { HttpServletResponse response = (HttpServletResponse) requestCycle.getResponse().getContainerResponse(); response.setStatus(HttpServletResponse.SC_NOT_FOUND);
/** * Renders the component tag body with the content of the JSP output */ @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { // Get the everything required to include the jsp file RequestCycle cycle = getRequestCycle(); ServletRequest request = (HttpServletRequest)cycle.getRequest().getContainerRequest(); JSPIncludeHttpServletResponseWrapper response = new JSPIncludeHttpServletResponseWrapper( (HttpServletResponse)cycle.getResponse().getContainerResponse()); ServletContext context = ((WebApplication)Application.get()).getServletContext(); // Handle a missing jsp file handleMissingResource(context); try { // include the JSP file by the given request / response context.getRequestDispatcher(resource).include(request, response); // replace the component tag body with the result of the JSP // output replaceComponentTagBody(markupStream, openTag, response.getOutput()); } catch (ServletException | IOException e) { throw new WicketRuntimeException(e); } }