Package org.apache.catalina.core
Class ApplicationResponse
- java.lang.Object
-
- jakarta.servlet.ServletResponseWrapper
-
- org.apache.catalina.core.ApplicationResponse
-
- All Implemented Interfaces:
jakarta.servlet.ServletResponse
public class ApplicationResponse extends jakarta.servlet.ServletResponseWrapper
START OF PWC 4858179 class ApplicationResponse extends ServletResponseWrapper {
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
included
Is this wrapped response the subject of aninclude()
call?
-
Constructor Summary
Constructors Constructor Description ApplicationResponse(jakarta.servlet.ServletResponse response)
Construct a new wrapped response around the specified servlet response.ApplicationResponse(jakarta.servlet.ServletResponse response, boolean included)
Construct a new wrapped response around the specified servlet response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isIncluded()
Return the included flag for this response.void
reset()
Disallowreset()
calls on a included response.void
setBufferSize(int size)
IgnoresetBufferSize()
calls on an included response.void
setContentLength(int len)
DisallowsetContentLength()
calls on an included response.void
setContentType(String type)
DisallowsetContentType()
calls on an included response.void
setLocale(Locale loc)
IgnoresetLocale()
calls on an included response.void
setResponse(jakarta.servlet.ServletResponse response)
Set the response that we are wrapping.
-
-
-
Constructor Detail
-
ApplicationResponse
public ApplicationResponse(jakarta.servlet.ServletResponse response)
Construct a new wrapped response around the specified servlet response.- Parameters:
response
- The servlet response being wrapped
-
ApplicationResponse
public ApplicationResponse(jakarta.servlet.ServletResponse response, boolean included)
Construct a new wrapped response around the specified servlet response.- Parameters:
response
- The servlet response being wrappedincluded
-true
if this response is being processed by aRequestDispatcher.include()
call
-
-
Method Detail
-
reset
public void reset()
Disallowreset()
calls on a included response.- Specified by:
reset
in interfacejakarta.servlet.ServletResponse
- Overrides:
reset
in classjakarta.servlet.ServletResponseWrapper
- Throws:
IllegalStateException
- if the response has already been committed
-
setContentLength
public void setContentLength(int len)
DisallowsetContentLength()
calls on an included response.- Specified by:
setContentLength
in interfacejakarta.servlet.ServletResponse
- Overrides:
setContentLength
in classjakarta.servlet.ServletResponseWrapper
- Parameters:
len
- The new content length
-
setContentType
public void setContentType(String type)
DisallowsetContentType()
calls on an included response.- Specified by:
setContentType
in interfacejakarta.servlet.ServletResponse
- Overrides:
setContentType
in classjakarta.servlet.ServletResponseWrapper
- Parameters:
type
- The new content type
-
setLocale
public void setLocale(Locale loc)
IgnoresetLocale()
calls on an included response.- Specified by:
setLocale
in interfacejakarta.servlet.ServletResponse
- Overrides:
setLocale
in classjakarta.servlet.ServletResponseWrapper
- Parameters:
loc
- The new locale
-
setBufferSize
public void setBufferSize(int size)
IgnoresetBufferSize()
calls on an included response.- Specified by:
setBufferSize
in interfacejakarta.servlet.ServletResponse
- Overrides:
setBufferSize
in classjakarta.servlet.ServletResponseWrapper
- Parameters:
size
- The buffer size
-
setResponse
public void setResponse(jakarta.servlet.ServletResponse response)
Set the response that we are wrapping.- Overrides:
setResponse
in classjakarta.servlet.ServletResponseWrapper
- Parameters:
response
- The new wrapped response
-
isIncluded
public boolean isIncluded()
Return the included flag for this response.
-
-