Class ServletSubRequest

All Implemented Interfaces:
IServletSubRequest, ServletRequest
Direct Known Subclasses:

public class ServletSubRequest extends Object implements IServletSubRequest

This does not implement ServletRequestWrapper 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 request due to its use of ThreadLocal to enforce the spec. This is very hackish and fragile - use at your own risk.

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

It is expected that the wrapped request 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 request.

This class is not thread safe.