A servlet is loaded at startup, processes several requests, and then is removed from the server. Identify the correct order of method invocations in its lifecycle.
- destroy() -> service() -> init()
- init() -> destroy() -> service()
- init() -> service() -> destroy()
- service() -> init() -> destroy()
The correct order of method invocations in the lifecycle of a servlet is init() (initialization) -> service() (processing requests) -> destroy() (removal from the server).
Loading...
Related Quiz
- In a web application tracking user login and logout, which listeners would be most effective?
- How can you track attribute changes in the HttpSession object?
- What method is used to execute a stored procedure using a CallableStatement?
- A ________ request can be cached by the browser, whereas a ________ request cannot.
- How does the use of 'lazy loading' in an ORM framework like Hibernate affect database performance?