• +91 9723535972
  • info@interviewmaterial.com

Servlet Interview Questions and Answers

Question - What are the life-cycle methods for a servlet?

Answer -

Method

Description

public void init(ServletConfig config)

It is invoked only once when first request comes for the servlet. It is used to initialize the servlet.

public void service(ServletRequest request,ServletResponse)throws ServletException,IOException

It is invoked at each request.The service() method is used to service the request.

public void destroy()

It is invoked only once when servlet is unloaded.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners