Life cyce / Interfaces in Java Servlets

Life cycle :
           The life cycle of servlets can be defined with their processes from which they created  , processed and destroyed.
  1. Servlet is initialized with init() method.
  2. Service() method reads the data requested from the server and processes it with the database , produces the output to the server.
    i) doPost(),
    ii) doGet(),
  3. destroy().Destroys the servlet process.

Servlets packages

Servletes can be created using java's standard packages which are
  • javax.servlet
  • javax.servlet.http

Advantages of Servlets

  • Servlets gives better performance
  • Portability
  • Secure
  • Robust   Because it uses java

What is Java servlets?

 Java servlets are used to create web applications. Servlets are programs that runs  on web or application server . Servlets acts as a bridge between Database and HTTP server requests