• Post Reply Bookmark Topic Watch Topic
  • New Topic

why Not encodeDispatchURL ????

 
Ganesh.P Ram
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

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.

Please clarify!!!

Ganesh
 
P Chittaranjan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!