Servlet API


The javax.servlet and javax.servlet.http packages that act as interfaces and tutorials for servlet api.

The javax.servlet package carries numerous interfaces and tutorials that are used by the servlet or web container. These are not specified to any protocol.

The javax.servlet.http package carries interfaces and classes that are incharge for http requests only.

What are the interfaces of javax.servlet packages, let’s see

Interfaces in javax.servlet package

Many interfaces are there in the javax.servlet package. They are given below

  1. Servlet
  2. ServletRequest
  3. ServletResponse
  4. RequestDispatcher
  5. ServletConfig
  6. ServletContext
  7. SingleThreadModel
  8. Filter
  9. FilterConfig
  10. FilterChain
  11. ServletRequestListener
  12. ServletRequestAttributeListener
  13. ServletContextListener
  14. ServletContextAttributeListener

Javax.servlet package classes

Many classes are there in javax.servlet package and they are given below:

  1. GenericServlet
  2. ServletInputStream
  3. ServletOutputStream
  4. ServletRequestWrapper
  5. ServletResponseWrapper
  6. ServletRequestEvent
  7. ServletContextEvent
  8. ServletRequestAttributeEvent
  9. ServletContextAttributeEvent
  10. ServletException
  11. UnavailableException

Interfaces in javax.servlet.http package

Many interfaces are there in javax.servlet.http package and they are given below:

  1. HttpServletRequest
  2. HttpServletResponse
  3. HttpSession
  4. HttpSessionListener
  5. HttpSessionAttributeListener
  6. HttpSessionBindingListener
  7. HttpSessionActivationListener
  8. HttpSessionContext (deprecated now)

Classes in javax.servlet.http package

Many classes are there in javax.servlet.http package and they are given below:

  1. HttpServlet
  2. Cookie
  3. HttpServletRequestWrapper
  4. HttpServletResponseWrapper
  5. HttpSessionEvent
  6. HttpSessionBindingEvent
  7. HttpUtils (deprecated now)