How many interfaces in a java servlet package?

Answer:
The javax.servlet package defines 12 interfaces, 7 classes, and 2 exceptions. The Interfaces are as follows:

Filter:- Preprocessor of the request before it reaches a servlet. It can also be a postprocessor of the response leaving a servlet. It can modify a request or response (for example, change headers), the request to a resource (a servlet or static content), or the response from a resource.
RequestDispatcher:- This is the servlet version of a redirect. It enables requests to be processed and then forwarded to other components of a Web application, such as another servlet, HTML file, or JSP file.
Servlet:- Defines the life-cycle methods that are implemented by all servlets.
ServletConfig:- This class has the methods for accessing the servlet configuration information such as the servlets name (from the web.xml file), the initialization parameters, and the ServletContext object.
ServletContext:- These methods enable your servlet to communicate with its servlet container. This is how you get the MIME type of a file, dispatch requests, or write to a log file. Notice that this information has application scope. The most important features of the ServletContext are application-scope attributes access, logging, and context initialization parameters.
ServletContextAttributeListener:- Implementations of this interface receive notifications of changes to the attribute list on the servlet context of a Web application. Supports the handling of the ServletContextAttributeEvent class.
ServletContextListener:- An interface that supports the handling of the ServletContextEvent class. Defines a set of methods that a servlet uses to communicate with its servlet container. It can get the MIME type of a file, dispatch requests, or write to a log file. Notice that there is one context per "Web application" per Java Virtual Machine. The specification defines a "Web application" as a collection of servlets and content installed under a specific subset of the server's URL namespace, such as /catalog, and possibly installed via a .war file.
ServletRequest:- This interface forms the base for the class that provides client request information to a servlet. It is protocol-independent.
ServletResponse:- This interface forms the base for the class that represents the response sent from the servlet to the client.
SingleThreadModel:- An interface that ensures a given servlet handles only one request at a time.
First answer by Anandvijayakumar. Last edit by Anandvijayakumar. Contributor trust: 782 [recommend contributor recommended]. Question popularity: 0 [recommend question].