RequestCycle originalRequestCycle = RequestCycle.get();
BufferedWebResponse tempResponse = new BufferedWebResponse(null);
RequestCycleContext requestCycleContext = new RequestCycleContext(originalRequestCycle.getRequest(),
tempResponse, application.getRootRequestMapper(), application.getExceptionMapperProvider().get());
RequestCycle tempRequestCycle = new RequestCycle(requestCycleContext);
final Response oldResponse = originalRequestCycle.getResponse();