Posts

Showing posts with the label Servlets

The javax.servlet Package

The javax.servlet package contains a number of interfaces and classes that establish the framework in which servlets operate. The most significant of these is Servlet. All servlets must implement this interface or extend a class that implements the interface Interface Description Servlet Declares life cycle methods for a servlet. ServletConfig Allows servlets to get initialization parameters ServletContext Enables servlets to log events and access information about their environment. ServletRequest Used to read data from a client request. ServletResponse Used to write data to a client response. The following table summarizes the core classes that are provided in the javax.servlet package: Class Description GenericServlet Implements the Servlet and ServletConfig interfaces. ServletInputStream Provides an input stream for reading requests from a client.

Servlet API

Two packages contain the classes and interfaces that are required to build servlets. javax.servlet javax.servlet.http These packages are the standard extensions provided by Tomcat. Hence, these are not included in Java 6. Please follow the links for more information.