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
Can bool be null?
Can we rethrow the same exception from catch handler?
If two threads have same priority which thread will be executed first ?
what is an objects lock and which objects have locks? : Java thread
Can we restart a thread already started in java?
Is null == null in java?
Can java inner class be static?
Why do we use threads in java?
extending thread class or implementing runnable interface. Which is better? : Java thread
What is the purpose of skeleton and stub?
What does mean in regex?
What is the difference between Java1.4 and Java1.5
What do you mean by flow of struts?
Explain the term virtual machine?
State the difference between strings and arrays.