Short note on Servlet API.
Servlet API
Two packages javax.servlet and javax.servlet.http contains the classes and interfaces that are required to build servlet. These two packages constitute the servlet API and these are not part of the core packages. Therefore they are not included in Java Software Development Kit (JSDK).
The javax.servlet package contains a number of interfaces and classes that establish the framework in which servlets operate.
- Interfaces defined in javax.servlet package: Servlet, ServletConfig, ServletContext, ServletRequest, ServletResponse
- Classes in javax.servlet packages: GenericServlet, ServletInputStream, ServletOutputStream, ServletException
b) The javax.servlet.http package contains a number of interfaces and classes that are commonly used by servlet developers. Its functionality is to make easy to build servlets that work with HTTP requests and responses.
- Interfaces used in javax.servlet.http package: HttpServletRequest, HttpServletResponse, HttpSession
- Classes used in javax.servlet.http package: Cookie, HttpServlet
Comments
Post a Comment