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 about method local inner classes or local inner classes in java?
Can we print null in java?
What is jvm? Why is java called the platform independent programming language?
Which keyword specify that a variable is effectively final ?
What is final variable?
Explain the term virtual machine?
How do you write a conditional statement?
What are the types of literals?
Describe the Big-O Notation.
Which is a valid identifier?
What is the difference between a constructor and a method?
What is package protected in java?
Can a method be static?
What is a flag variable?
What is the function of http?