Servlet 2.2 Specification Errata

April 1, 2000

Specification

  1. Spec document p29: on how to computer the context path from a URL.
    Clarify here that in decomposing a URL into
    requestURI = contextPath + servletPath + pathInfo
    
    that in deciding what to take for the contextPath and servletPath, the longest matching context root should win.
  2. Spec document: the examples on p29, 5.4, Table 1 are incorrect.
    Replace 'Pattern: /lawn' with 'Pattern: /lawn/*' Replace 'Pattern: /garden' with 'Pattern: /garden/*'
  3. Spec document, sec 8.2.
    Clarification that on forward() and include() the query string is aggregated. If ServletA forwards to ServletB, for example, the ServletB can obtain through the getParameterXXX() API the request parameters that were originally passed to servletA.
  4. typo on p50
    "The web client obtains the username and the password from the user an transmits them to the web server."

    'an' should be 'and'

  5. Add status code 307 (temporary redirect) to status codes in HttpServletResponse (a la RFC 2616)

  6. Define the Java types for the following attributes of the request object (section 9.8)
    javax.servlet.error.status_code
    javax.servlet.error.exception_type
    javax.servlet.error.message
    
    to be Integer, Class and String respectively.

Javadoc

  1. javadoc: HttpServletRequest.getRequestURI() replace with:-
    Returns the part of this request's URL after the portion up to the query string in the first line of the HTTP request, inclusive of the leading '/'. For example:

    First line of HTTP request  Returned Value
    POST    /some/path.html HTTP/1.1  /some/path.html
    GET http://foo.bar/a.html HTTP/1.0 /a.html
    HEAD /xyz?a=b HTTP/1.1 /xyz
    
  2. javadoc: HttpSession.removeValue(java.lang.String name) should read:-
    Deprecated. As of Version 2.2, this method is replaced by
    removeAttribute(java.lang.String name)
      Parameters:
          name - the name of the object to remove from this session
      Throws:
          IllegalStateException - if this method is called on 
                                  an invalidated session
    
  3. Add specification in the javadoc that if an object is replaced in the attributes list of an HttpSession and the outgoing object implements HttpSessionBindingListener, it should have its valueUnbound() method called prior to the new object being added to the attribute list.