Q : In session created by server with client(browser) How
can server find that request coming is belong to new
session OR belong to session that is timeout.
Answer Posted / vanita
when client request for the first time, container generates
a session id for that perticular user. server process the
request and sends the response and also sends that sessionID.
for next request from the same user, that session id must be
sent back to the server so that server can fetch the
sessionID from request and match with previously generated
IDs , if match then it associates this next request with
the previous session.
This transfer of sessionId b/w server and user can be done
via 2 ways -
1. By cookies
2. By URL rewritting
In case if browser doesnt support cookies, then only the
second method is used.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is expression language injection?
What are the jsp elements?
Explain the difference between servlet and jsp?
When does a container initialize multiple jsp / servlet objects?
What is jsp api?
What is pagescope in jsp?
What is the difference between servletcontext and pagecontext?
What is jsp and how it works?
What is difference between sendredirect and forward?
How many tags are provided in jstl?
How session is achieved in JSP?(once user logs out,if he press back button of browser he should not be allowed to same page)
What is jsp and why do we need it?
How we can disable session in jsp?
What are the different life-cycle methods?
How does el search for an attribute?