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
If a class is declared without any access modifiers, where can the class be accessed?
What is the difference between preemptive scheduling and time slicing?
Explain the difference between runnable and callable interface in java?
How do I write a self declaration?
Is linkedlist thread safe in java?
How do you find the maximum number from an array without comparing and sorting?
What is boolean in java?
What is json parser in java?
What is java thread dump, how can we get java thread dump of a program?
What is synchronization and why is it important in java programming?
Why java is object oriented?
Is array a class in java?
What is the difference between size and length in java?
What is the purpose of final keyword and when to use it?
Describe what happens when an object is created in java ?