Name

ServletResponseWrapper

Synopsis

A convenience method that can be used by filter developers to modify the behavior of a ServletResponse object. The default implementation of each method calls through to the original ServletResponse object, and methods can be selectively overridden to provide additional functionality. ServletResponseWrapper objects can also be used in calls to the forward() and include() methods of RequestDispatcher.

                  Returned By
public class ServletResponseWrapper implements ServletResponse {
// Public Constructors
   public ServletResponseWrapper( ServletResponse response);  
// Public Instance Methods
   public ServletResponse getResponse();  
   public void setResponse( ServletResponse response);  
// Methods Implementing ServletResponse
   public void flushBuffer() throws IOException;  
   public int getBufferSize();  
   public String getCharacterEncoding();  
   public java.util.Locale getLocale();  
   public ServletOutputStream getOutputStream(
        ) throws IOException;  
   public PrintWriter getWriter() throws IOException;  
   public boolean isCommitted();  
   public void reset();  
   public void resetBuffer();  
   public void setBufferSize( int size);  
   public void setContentLength( int len);  
   public void setContentType( String type);  
   public void setLocale( java.util.Locale loc);  
}

Subclasses

javax.servlet.http.HttpServletResponseWrapper

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.