List of usage examples for javax.servlet ServletResponseWrapper getResponse
public ServletResponse getResponse()
From source file:net.lightbody.bmp.proxy.jetty.jetty.servlet.ServletHttpResponse.java
/** Unwrap a ServletResponse. * * @see javax.servlet.ServletResponseWrapper * @see javax.servlet.http.HttpServletResponseWrapper * @param response /* w w w . ja v a2 s. c o m*/ * @return The core ServletHttpResponse which must be the * underlying response object */ public static ServletHttpResponse unwrap(ServletResponse response) { while (!(response instanceof ServletHttpResponse)) { if (response instanceof ServletResponseWrapper) { ServletResponseWrapper wrapper = (ServletResponseWrapper) response; response = wrapper.getResponse(); } else throw new IllegalArgumentException("Does not wrap ServletHttpResponse"); } return (ServletHttpResponse) response; }