Servlet API

Servlet Package:

javax.servlet Package:

Interfaces:

InterfaceDescription
Servlet:Having declaration of life cycle methods for a servlet.
ServletConfig:With this we can get initialization parameters.
ServletContext:To access information about servlet environment.
ServletRequest:To read client request data.
ServletResponse:To write data to a client response.
SingleThreadModel:To implement single threaded servlet.

Classes:

ClassDescription
GenericServlet: It Implements the Servlet and ServletConfig interfaces.
ServletInputStream: Input stream class to read requests from a client.
ServletOutputStream: Output stream class for writing responses to a client.
ServletException: To handle servlet exception
UnavailableException: Exception if servlet is not available.

javax.servlet.http Package:

Interfaces:

InterfaceDescription
HttpServletRequest To read HTTP request.
HttpServletResponse It is to write HTTP response.
HttpSession For reading and writting session data.
HttpSessionBindingListener Informs an object that it is bound to or unbound from a session.

Classes:

ClassDescription
Cookie To read cookie information from request and write state information to response.
HttpServlet It is to handle HTTP requests and responses.
HttpSessionEvent Encapsulates a session-changed event.
HttpSessionBindingEvent Indicates when a listener is bound to or unbound from a session value, or that a session attribute changed.