This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
My understanding about encodeURL is that, if the cookies are not enabled, then the container creates the session id and passes it along with response and similarily gets the sessionId through the request that the client sends.
encodeRedirectURL is used when I redirect to another servlet (again cookies are not enabled), and that servlet makes use of this session Id ?
My question is: why dont we have a similar method for encodeDispatchURL - so that the servlet to which the request is dispatched can make use of the sessionId.
Joined: Feb 09, 2006
Because dispatch action is performed at server side.And during dispatch we are passing the request and response object.
Since the same request and response object available in the forwarded or included servlet/jsp, we don't need to encode it.