The jakarta.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container. For versions prior to 4.0.2 these classes and interfaces are described by the Java Servlet API Specification. For version 4.0.2 and later they are described by the Jakarta Servlet Specification.
Interface Summary Interface Description AsyncContextClass representing the execution context for an asynchronous operation that was initiated on a ServletRequest. AsyncListenerListener that will be notified in the event that an asynchronous operation initiated on a ServletRequest to which the listener had been added has completed, timed out, or resulted in an error. FilterA filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. FilterChainA FilterChain is an object provided by the servlet container to the developer giving a view into the invocation chain of a filtered request for a resource. FilterConfigA filter configuration object used by a servlet container to pass information to a filter during initialization. FilterRegistrationInterface through which a
Filtermay be further configured.
FilterRegistration.Dynamic ReadListenerThis class represents a call-back mechanism that will notify implementations as HTTP request data becomes available to be read without blocking. Registration Registration.Dynamic RequestDispatcherDefines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. ServletDefines methods that all servlets must implement. ServletConfigA servlet configuration object used by a servlet container to pass information to a servlet during initialization. ServletContainerInitializerInterface which allows a library/runtime to be notified of a web application's startup phase and perform any required programmatic registration of servlets, filters, and listeners in response to it. ServletContextDefines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. ServletContextAttributeListenerInterface for receiving notification events about ServletContext attribute changes. ServletContextListenerInterface for receiving notification events about ServletContext lifecycle changes. ServletRegistrationInterface through which a
Servletmay be further configured.
ServletRegistration.Dynamic ServletRequestDefines an object to provide client request information to a servlet. ServletRequestAttributeListenerInterface for receiving notification events about ServletRequest attribute changes. ServletRequestListenerInterface for receiving notification events about requests coming into and going out of scope of a web application. ServletResponseDefines an object to assist a servlet in sending a response to the client. SessionCookieConfigClass that may be used to configure various properties of cookies used for session tracking purposes. SingleThreadModel Deprecated.As of Java Servlet API 2.4, with no direct replacement. WriteListenerCallback notification mechanism that signals to the developer it's possible to write content without blocking.
Class Summary Class Description AsyncEventEvent that gets fired when the asynchronous operation initiated on a ServletRequest (via a call to
ServletRequest.startAsync(ServletRequest, ServletResponse)) has completed, timed out, or produced an error.
GenericFilterDefines a generic, protocol-independent filter. GenericServletDefines a generic, protocol-independent servlet. HttpConstraintElementJava Class representation of an
HttpMethodConstraintElementJava Class represntation of an
MultipartConfigElementJava Class represntation of an
ServletContextAttributeEventEvent class for notifications about changes to the attributes of the ServletContext of a web application. ServletContextEventThis is the event class for notifications about changes to the servlet context of a web application. ServletInputStreamProvides an input stream for reading binary data from a client request, including an efficient
readLinemethod for reading data one line at a time.
ServletOutputStreamProvides an output stream for sending binary data to the client. ServletRequestAttributeEventThis is the event class for notifications of changes to the attributes of the servlet request in an application. ServletRequestEventEvents of this kind indicate lifecycle events for a ServletRequest. ServletRequestWrapperProvides a convenient implementation of the ServletRequest interface that can be subclassed by developers wishing to adapt the request to a Servlet. ServletResponseWrapperProvides a convenient implementation of the ServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet. ServletSecurityElementJava Class representation of a