What are the different methods involved in the process of session management in servlets?
Answer / Shahnawaz Ali
The following methods are involved in session management in Servlets:
1. setSession(HttpSession session): To create a new session.
2. getSession(): To retrieve an existing session for the current user.
3. getSession(boolean create): To retrieve or create a session if it doesn't exist.
4. invalidate(): To end the current session.
| Is This Answer Correct ? | 0 Yes | 0 No |
How can we refresh automatically when new data has entered the database?
what is servlet life cycle?
What is ServletContext object?
how can we execute servelt? what the use ".war" or ".jar" file creation
What is difference between get and post method?
Explain web application directory arrangement?
What is a java servlet?
What are the different methods of session management in servlets?
What is a web application and what is it’s directory structure?
without session Id can we do any operations like add,update,edit,delete. I saw Session id is loaded for edit and delete action not for add .so am asking this
what is session tracking?what are types of session tracking ?and when to cookies,when to use sessionmanagement,whent use url rewriting technique,plz explain briefly?
Why don't we write a constructor in a servlet?