Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Servlets%20Interview%20Questions%20and%20Answers

Question: When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
Answer: An instance of servlet is created when the servlet is loaded for the first time in the container. Init() method is used to configure this servlet instance. This method is called only once in the life time of a servlet, hence it makes sense to write all those configuration details about a servlet which are required for the whole life of a servlet in this method.
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook