During the servlet lifecycle, which method is called only once and is used for initialization purposes?
- destroy()
- doGet()
- init()
- service()
The init() method is called only once when a servlet is first loaded into memory and is used to perform any necessary initialization tasks.
Loading...
Related Quiz
- How does the servlet container handle thread safety in the case of servlets?
- How would a filter log request information without altering the request itself?
- How does a servlet typically report an error back to the client?
- _________ is used to monitor lifecycle events of a session.
- What is the primary advantage of using connection pooling in a web application?