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 is the difference between Java1.4 and Java1.5
Explain list interface?
What is the difference between iterator and enumeration ?
What will happen if a thrown exception is not handled?
What is treemap in java?
What is vector capacity in java?
How do you create a sop?
What is thread safe singleton?
What is set and get methods in java?
What does string intern() method do?
What does compareto () do in java?
What is volatile keyword in java
How to find the index of the largest number in an arraylist java?
What is an object’s lock and which object’s have locks?
What is the size of an array?