Servlet API


Prev Tutorial Next Tutorial

Servlet API

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

Package

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

  • javax.servlet
  • javax.servlet.http

javax.servlet

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

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

Advertisements




Facebook Likes

Advertisements