FileDocCategorySizeDatePackage
ApplicationResponse.javaAPI DocGlassfish v2 API6833Fri May 04 22:31:54 BST 2007org.apache.catalina.core

ApplicationResponse

public class ApplicationResponse extends ServletResponseWrapper
START OF PWC 4858179 class ApplicationResponse extends ServletResponseWrapper {

Fields Summary
protected boolean
included
Is this wrapped response the subject of an include() call?
protected static final org.apache.catalina.util.StringManager
sm
The string manager for this package.
Constructors Summary
public ApplicationResponse(ServletResponse response)
Construct a new wrapped response around the specified servlet response.

param
response The servlet response being wrapped


        this(response, false);

    
public ApplicationResponse(ServletResponse response, boolean included)
Construct a new wrapped response around the specified servlet response.

param
response The servlet response being wrapped
param
included true if this response is being processed by a RequestDispatcher.include() call


        super(response);
        setIncluded(included);

    
Methods Summary
public booleanisIncluded()
Return the included flag for this response.


        return (this.included);

    
public voidreset()
Disallow reset() calls on a included response.

exception
IllegalStateException if the response has already been committed



    // ------------------------------------------------ ServletResponse Methods


                          
       

        // If already committed, the wrapped response will throw ISE
        if (!included || getResponse().isCommitted())
            getResponse().reset();

    
public voidsetBufferSize(int size)
Ignore setBufferSize() calls on an included response.

param
size The buffer size

        if (!included)
            getResponse().setBufferSize(size);
    
public voidsetContentLength(int len)
Disallow setContentLength() calls on an included response.

param
len The new content length


        if (!included)
            getResponse().setContentLength(len);

    
public voidsetContentType(java.lang.String type)
Disallow setContentType() calls on an included response.

param
type The new content type


        if (!included)
            getResponse().setContentType(type);

    
voidsetIncluded(boolean included)
Set the included flag for this response.

param
included The new included flag


        this.included = included;

    
public voidsetLocale(java.util.Locale loc)
Ignore setLocale() calls on an included response.

param
loc The new locale

        if (!included)
            getResponse().setLocale(loc);
    
public voidsetResponse(javax.servlet.ServletResponse response)
Set the response that we are wrapping.

param
response The new wrapped response


        super.setResponse(response);