I was confused by this...cookie : CooName="cookie value"; JSESSIONID=BD102D632EFF38F4B0BD08BAD3F0FF88
I checked the cookie in the browser and i see the following.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sony Agrawal wrote:Hmmm.. so you mean to say that if i create a cookie but without a session then the container will create a session
Sony Agrawal wrote:and put that cookie in the session and send it to the client.
Sony Agrawal wrote:put that cookie in the session and send it to the client.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
seetharaman venkatasamy wrote:Well, HTTP is a stateless protocal . For more details google for *Session Tracking* .
Sony Agrawal wrote:But what is the need for creating that session ??
Sagar Rohankar wrote:the container and eventually the web app has some mean to recognize whose cookie it is.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Chinmaya Chowdary wrote:Can you please post, how you are accessing parameter "Name" in servlet, through html form or jsp?
Sony Agrawal wrote:I understand that ..... but what if a apllication just want to know the name of the person who is browsing the site . In such a suitation the application would request for the name and set that as cookie and use the cookie to put that person's name in further pages(like in the right top corner)???
In such a suitation cookie are just enough ...right???
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
And what if two persons having the same name browsing from different geographical area ?
in the browser.JSESSIONID=BD102D632EFF38F4B0BD08BAD3F0FF88
. Finally browser is having two cookies.CooName="cookie value"
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
Chinmaya Chowdary wrote:Suppose if we send request for jsp form, 'form.jsp', container/server implicitly creates session object and and gets the id from that object, encapsultates it into cookie object and sends it to the client. Now we have one JSESSIONID cookie in the browser.
Sony wrote: Hmmm.. i just tried it.... And it creates session object for JSP and not for html... But still i am not clear why we need a session ... like in the suitation that i said before
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
Now another request comes for the two.jsp page , which accepts the cookie and print the name in the JSP page.
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
Sagar Rohankar wrote:the container and eventually the web app has some mean to recognize whose cookie it is
But I'm not sure here![]()
Sagar Rohankar wrote:
And what if two persons having the same name browsing from different geographical area ?
Thanks and Regards
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |