Using a Request Dispatcher
To use a request dispatcher, a servlet calls either the include method or forward method of the RequestDispatcher interface. The parameters to these methods can be either the request and response arguments that were passed in via the service method of the javax.servlet interface, or instances of subclasses of the request and response wrapper classes that were introduced for version 2.3 of the specification. In the latter case, the wrapper instances must wrap the request or response objects that the container passed into the service method.
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.
No comments:
Post a Comment