Servlet API


Prev Tutorial Next Tutorial

What is Servlet API

Servlet API provides Classes and Interface to develop web based applications.


Servlet API contains two java packages are used to developed the servlet programs, they are:

  • javax.servlet
  • javax.servlet.http


javax.servlet package contains list of interfaces and classes that are used by the servlet or web container. These classes and interface are not specific to any protocol.


javax.servlet.http package contains list of classes and interfaces to define http servlet programs. This package are used to interact with browser using http protocol. It is only responsible for http requests.

Interfaces in javax.servlet package

  • Servlet
  • ServletRequest
  • ServletResponse
  • RequestDispatcher
  • ServletConfig
  • ServletContext
  • SingleThreadModel
  • Filter
  • FilterConfig
  • FilterChain
  • ServletRequestListener
  • ServletRequestAttributeListener
  • ServletContextListener
  • ServletContextAttributeListener

Classes in javax.servlet package

  • GenericServlet
  • ServletInputStream
  • ServletOutputStream
  • ServletRequestWrapper
  • ServletResponseWrapper
  • ServletRequestEvent
  • ServletContextEvent
  • ServletRequestAttributeEvent
  • ServletContextAttributeEvent
  • ServletException
  • UnavailableException

Interfaces in javax.servlet.http package

  • HttpServletRequest
  • HttpServletResponse
  • HttpSession
  • HttpSessionListener
  • HttpSessionAttributeListener
  • HttpSessionBindingListener
  • HttpSessionActivationListener
  • HttpSessionContext (deprecated now)

Classes in javax.servlet.http package

  • HttpServlet
  • Cookie
  • HttpServletRequestWrapper
  • HttpServletResponseWrapper
  • HttpSessionEvent
  • HttpSessionBindingEvent
  • HttpUtils (deprecated now)

Prev Tutorial Next Tutorial


Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements

Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: or 9999595223 Try this Keyword C++ Programs