• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URL Rewrting

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Michael Ku
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic