I have a use case that the request to be dispatched by trimming request URL to same context by setting some attributes with it. Will this be handled in same thread or in new thread?
It will be handled in the same thread. The Servlet specification states
The Container Provider should ensure that the dispatch of the request to a target servlet occurs in the same thread of the same JVM as the original request.
It does seem like this is a recommendation, but most implementations I know of do it in the same thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With