Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL Rewrting

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1 )Why encodeURL() is called on response object?

When we want to use session with cookies we are requesting container to make session object, create cookie, stuff session id into cookie.This steps gets created by container using request object.

Likewise here also we are requesting the container to extract the seession Id from cookie and append at the end of URL. I can't understand why it called on response object
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if cookies are turned off by the user? How will you access your session upon returning to the site??
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1)Even user turns off the cookie, container still takes seession id from cookie only and attach at the end of every URL.Provied that session ID and Cookie must exist. What if this first request from client and browser is not accepting cookies In this case how session id will attached to the url?
In any case it taking the help of cookies to attach session id at the end of URL.
Please explain?
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not understand what you are asking or the point you are trying to make. IT seems to me that you think that the session ID is only obtained from the cookie and it is the first trip to the server that has no cookie with a session ID that is your concern. The container is doing a lot of things for you including checking to see if the request is associated with an existing session. On the first trip back to the client, since it cannot know at that point if the client accepts cookies or not, it will send both a cookie and the appended information in the URL if URL rewriting is turned on and encodeURL method is invoked.
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael Ku
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic