Example usage for javax.servlet ServletResponseWrapper getOutputStream

List of usage examples for javax.servlet ServletResponseWrapper getOutputStream

Introduction

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

Prototype


public ServletOutputStream getOutputStream() throws IOException 

Source Link

Document

The default behavior of this method is to return getOutputStream() on the wrapped response object.

Usage

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

private ServletResponse writeResultToResponseAsXml(XmlRpcStreamRequestConfig streamConfig, ServletResponse resp,
        Object theResult) {//from w w w .j  a v  a  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;
}