Example usage for javax.servlet ServletResponseWrapper ServletResponseWrapper

List of usage examples for javax.servlet ServletResponseWrapper ServletResponseWrapper

Introduction

In this page you can find the example usage for javax.servlet ServletResponseWrapper ServletResponseWrapper.

Prototype


public ServletResponseWrapper(ServletResponse response) 

Source Link

Document

Creates a ServletResponse adaptor wrapping the given response object.

Usage

From source file:com.keithhutton.ws.proxy.ProxyServlet.java

private ServletResponse writeResultToResponseAsXml(XmlRpcStreamRequestConfig streamConfig, ServletResponse resp,
        Object theResult) {/*from w  ww .java 2  s. c o m*/
    ServletResponseWrapper respWrapper = new ServletResponseWrapper(resp);
    try {
        ServletOutputStream sos = respWrapper.getOutputStream();
        writeResponse(streamConfig, sos, theResult);
    } catch (XmlRpcException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return respWrapper;
}