can i call destroy() method in init() method of servlet
Answer Posted / deepesh
Yes, We can call destroy() from init() method but after
coming out from the destroy() it will again process the init
() method like the life cycle has to be. Thus we can not
control the servlet life cycle, though we can call destroy
() from init().
Thanks.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How is the get () method different from the post() method?
What is the main purpose of java servlets?
What is meant by cookies?
What are the different mode that servlets can be used?
What is meant by servlet? What are the parameters of the service method?
What are some advantages of storing session state in cookies?
What are the annotations used in servlet 3?
Why do we have servlet filters?
If my browser does not support cookie, and my server sends a cookie instance what will happen?
What are the advantages of Servlet over CGI?
What’s the difference between genericservlet and httpservlet?
Why is a constructor needed in a servlet even if we use the init method?
If some new data has entered the database, explain how can a servlet refresh automatically?
Why doesn’t a servlet include main()? How does it work?
A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?