How to Create Servlet


Prev Tutorial Next Tutorial

How to Create Servlet

According to servlet API we have three ways to creating a servlet class.

  • By implementing servlet interface
  • By extending GenericServlet class
  • By extending HttpServlet class
how to create servlet

By implementing servlet interface

Example

public class myServlet implements Servlet
.......
.......
}

By extending GenericServlet class

Example

public class myServlet extends GenericServlet
.......
.......
}

By extending HttpServlet class

Example

public class myServlet extends HttpServlet
.......
.......
}

Prev Tutorial Next Tutorial

Advertisements
Download Projects

Advertisements

Download WhatsApp Status Video

Buy This Ad Space Only $50 per Month, Ad Size 300X250 Contact on: [email protected] WhatsApp no. 8882538826

Google Adsense Advertisements