Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Java Servlet API is an abstraction and defines the minimum requirements needed by any Java Web Application to handle any kind of request (if you look at it you will notice that almost all classes there are defined as interfaces or abstract classes).</p> <p>This API has been defined by the <a href="http://jcp.org/en/home/index" rel="nofollow">JCP</a> after a process in which different Java Server vendors (IBM, Sun, Apache, Oracle, etc.) agreed on the minimum requirements thus defining what is considered now as the official standard. However, the different vendors have different ways of implementing their servlet containers resulting in the diverse amount of them nowadays (each of them with different features).</p> <p>Since servlet containers need to keep track of both objects (the request and the response) to do a proper handling of both, they can't leverage the responsibility of creating a <code>ServletResponse</code> (or the HTTP variant <code>HttpServletResponse</code>) to the user - remember that what goes inside the Servlet's <code>service</code> method is user code. So, servlet containers create and prepopulate a request and response objects (using their own implementations) prior to invoke the <code>service</code> method. From the user point of view, just handling them through the interfaces is enough and this also protects vendor-specific code since we don't have access to the actual implementation of both objects.</p> <p>However, when the API was defined these vendors realised that, in some cases, the user would like to override the default behaviour of any of those objects so they included a set of wrappers (<code>HttpServletRequestWrapper</code>, <code>HttpServletResponseWrapper</code>, etc.) that can be extended by user code and used in either servlets or filters to replace the default implementations provided by the container.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload