How can the session in servlet can be destroyed?
Answer / Rahul Chauhan
A servlet session can be destroyed automatically when it becomes inactive (by configuring the timeout value) or explicitly by calling the invalidate() method on the HttpSession object. You can also use a listener to monitor sessions and manage their lifecycle based on application-specific rules.
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell the new features added in servletrequest interface i.e. Servlet 2.4
What is URL Encoding?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What is meant by servlet? What are the parameters of the service method?
What is the major difference between servlet and applet?
What is the use of httpservletrequestwrapper?
What is SingleThreadModel interface?
Explain the difference between get and post method in servlet?
What is url encoding and url decoding
What is MIME Type?
Which event is fired at the time of session creation and destroy?
Is servlet synchronized?