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

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements