Class ServletSubResponse

java.lang.Object
com.aoapps.servlet.subrequest.ServletSubResponse
All Implemented Interfaces:
IServletSubResponse, ServletResponse
Direct Known Subclasses:
HttpServletSubResponse

public class ServletSubResponse extends Object implements IServletSubResponse

This does not implement ServletResponseWrapper and use of it is in violation of the specification. When used in conjunction with new threads (or threads from your own pool), Tomcat 7.0 and 8.5 do not notice you switched the response due to its use of ThreadLocal to enforce the spec. This is very hackish and fragile - use at your own risk.

Wraps a servlet response with the intent to operate as a concurrent sub response. Any changes made to the response will only affect this response and will not be passed along to the wrapped response.

It is expected that the wrapped response will not change for the life of this wrapper. If it does change, the changes may or may not be visible depending on what has been accessed and changed on this response.

This class is not thread safe.