What is Session and cookies?Explain in detail with an
example?
Answer Posted / debapriya maity
we r all familiar with the method given below
HttpSession session==request.getSession(true);
what happen here
Container whenever gets a request for a session from a client,
it checks out whether the request is for existing or a new
one,how it does.
If a new session: creates a cookie(small text file) ,stuffs
the session id ,and send it to the client as apart of
response headers (Set Cookie:)
existing one---gets the sessionid ,searches for the matching
session and associate with the request.
Now thing if ur browser is cookies disable, what will happen
next?? :)
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
What are the steps involved to create a bean?
How is garbage collection controlled?
What is a default constraint?
What is static data type in java?
Which methods cannot be overridden in java?
What is the difference between the paint() and repaint() methods?
What do you mean by object?
Explain illegalmonitorstateexception and when it will be thrown?
How many bits is a word?
What is JVM and is it platform independent?
How can we pass argument to a function by reference instead of pass by value?
Can you extend main method in java?
What is the benefit of lambda expressions?
What is the difference between Grid and Gridbaglayout?
What does exp mean in math?