1.1MR E005-E0013

svn path=/trunk/; revision=555
diff --git a/spec/chapters/changes.tex b/spec/chapters/changes.tex
index 2bf480a..aed316e 100644
--- a/spec/chapters/changes.tex
+++ b/spec/chapters/changes.tex
@@ -10,6 +10,8 @@
 \item Section \ref{message_body_reader}: default to application/octet-stream if a request does not contain a content-type header.
 \item Section \ref{resource_field}: add support for static fromString method.
 \item Section \ref{annotationinheritance}: clarify annotation inheritance.
+\item Section \ref{security_context}: fix typo.
+\item Section \ref{servlet_container}: additional considerations related to filters consuming request bodies.
 \end{itemize}
 
 \section{Changes Since Proposed Final Draft}
diff --git a/spec/chapters/context.tex b/spec/chapters/context.tex
index 44958ab..e5afeb0 100644
--- a/spec/chapters/context.tex
+++ b/spec/chapters/context.tex
@@ -76,7 +76,7 @@
 \subsection{Security Context}
 \label{security_context}
 
-The \SecurityContext\ interface provides access to information about the security context of the current request. An instance of \SecurityContext\ can be injected into a class field or method parameter using the \Context\ annotation. The methods of \SecurityContext\ provide access to the current user principle, information about roles assumed by the requester, whether the request arrived over a secure channel and the authentication scheme used.
+The \SecurityContext\ interface provides access to information about the security context of the current request. An instance of \SecurityContext\ can be injected into a class field or method parameter using the \Context\ annotation. The methods of \SecurityContext\ provide access to the current user principal, information about roles assumed by the requester, whether the request arrived over a secure channel and the authentication scheme used.
 
 \subsection{Providers}
 \label{providercontext}
diff --git a/spec/chapters/environment.tex b/spec/chapters/environment.tex
index e60dfaa..393abdb 100644
--- a/spec/chapters/environment.tex
+++ b/spec/chapters/environment.tex
@@ -4,6 +4,7 @@
 The container-managed resources available to a \jaxrs\ root resource class or provider depend on the environment in which it is deployed. Section \ref{contexttypes} describes the types of context available regardless of container. The following sections describe the additional container-managed resources available to a \jaxrs\ root resource class or provider deployed in a variety of environments.
 
 \section{Servlet Container}
+\label{servlet_container}
 
 The \Context\ annotation can be used to indicate a dependency on a Servlet-defined resource. A Servlet-based implementation MUST support injection of the following Servlet-defined types: \code{Servlet\-Config}, \code{Servlet\-Context}, \code{Http\-Servlet\-Request} and \code{Http\-Servlet\-Response}.
 
@@ -11,6 +12,8 @@
 
 An injected \code{Http\-Servlet\-Response} allows a resource method to commit the HTTP response prior to returning. An implementation MUST check the committed status and only process the return value if the response is not yet committed.
 
+Servlet filters may trigger consumption of a request body by accessing request parameters. In a servlet container the @FormParam annotation and the standard entity provider for \code{application/x-www-form-urlencoded} MUST obtain their values from the servlet request parameters if the request body has already been consumed. Servlet APIs do not differentiate between parameters in the URI and body of a request so URI-based query parameters may be included in the entity parameter.
+
 \section{Java EE Container}
 \label{javaee}
 
diff --git a/spec/chapters/resources.tex b/spec/chapters/resources.tex
index 2c49123..1aa88aa 100644
--- a/spec/chapters/resources.tex
+++ b/spec/chapters/resources.tex
@@ -43,9 +43,9 @@
 Valid parameter types for each of the above annotations are listed in the corresponding Javadoc, however in general (excluding \Context) the following types are supported:
 
 \begin{enumerate}
-\item Primitive types
-\item\label{stringctor} Types that have a constructor that accepts a single \code{String} argument
-\item\label{valueofmethod} Types that have a static method named \code{valueOf} or \code{fromString} with a single \code{String} argument - if both methods are present then \code{valueOf} MUST be used unless the type is an enum in which case \code{fromString} MUST be used
+\item Primitive types.
+\item\label{stringctor} Types that have a constructor that accepts a single \code{String} argument.
+\item\label{valueofmethod} Types that have a static method named \code{valueOf} or \code{fromString} with a single \code{String} argument that return an instance of the type. If both methods are present then \code{valueOf} MUST be used unless the type is an enum in which case \code{fromString} MUST be used.
 \item \code{List<{\em T}>}, \code{Set<{\em T}>}, or \code{SortedSet<{\em T}>}, where \code{{\em T}} satisfies \ref{stringctor} or \ref{valueofmethod} above.
 \end{enumerate}
 
@@ -71,7 +71,7 @@
 \begin{itemize}
 \item The \code{Default\-Value} annotation may be used to supply a default value for parameters
 \item The \code{Encoded} annotation may be used to disable automatic URI decoding of parameter values
-\item Exceptions thrown during construction of parameter values are treated the same as exceptions thrown during construction of field or bean property values, see section \ref{resource_field}.
+\item Exceptions thrown during construction of parameter values are treated the same as exceptions thrown during construction of field or bean property values, see section \ref{resource_field}. Exceptions thrown during construction of \FormParam\ annotated parameter values are treated the same as if the parameter were annotated with \HeaderParam.
 \end{itemize}
 
 \subsubsection{Entity Parameters}
diff --git a/src/jsr311-api/src/javax/ws/rs/core/CacheControl.java b/src/jsr311-api/src/javax/ws/rs/core/CacheControl.java
index 76fef57..5eb4616 100644
--- a/src/jsr311-api/src/javax/ws/rs/core/CacheControl.java
+++ b/src/jsr311-api/src/javax/ws/rs/core/CacheControl.java
@@ -59,7 +59,7 @@
      * <li>proxyRevalidate = false</li>
      * <li>An empty list of private fields</li>
      * <li>An empty list of no-cache fields</li>
-     * <li>An empty list of cache extensions</li>
+     * <li>An empty map of cache extensions</li>
      * </ul>
      */
     public CacheControl() {
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java b/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java
index 5439cea..e4d8221 100644
--- a/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java
+++ b/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java
@@ -42,7 +42,13 @@
 public interface MessageBodyReader<T> {
     
     /**
-     * Ascertain if the MessageBodyReader can produce an instance of a particular type.
+     * Ascertain if the MessageBodyReader can produce an instance of a
+     * particular type. The type parameter gives the
+     * class of the object that should be produced, the genericType parameter
+     * gives the java.lang.reflect.Type of the object that should be produced.
+     * E.g. if the object to be produced is List<String>, the type parameter
+     * will be java.util.List and the genericType parameter will be
+     * java.lang.reflect.ParameterizedType.
      *
      * @param type the class of object to be produced.
      * @param genericType the type of object to be produced. E.g. if the 
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/Providers.java b/src/jsr311-api/src/javax/ws/rs/ext/Providers.java
index 51a2b3c..0fc8ce1 100644
--- a/src/jsr311-api/src/javax/ws/rs/ext/Providers.java
+++ b/src/jsr311-api/src/javax/ws/rs/ext/Providers.java
@@ -49,7 +49,6 @@
      * the first reader that returns {@code true} is selected and returned.
      * 
      * @param type the class of object that is to be read.
-     * @param mediaType the media type of the data that will be read.
      * @param genericType the type of object to be produced. E.g. if the 
      * message body is to be converted into a method parameter, this will be
      * the formal type of the method parameter as returned by 
@@ -59,6 +58,7 @@
      * message body is to be converted into a method parameter, this will be
      * the annotations on that parameter returned by 
      * <code>Class.getParameterAnnotations</code>.
+     * @param mediaType the media type of the data that will be read.
      * @return a MessageBodyReader that matches the supplied criteria or null
      * if none is found.
      */
@@ -79,7 +79,6 @@
      * method is called on each writer in order using the supplied criteria and
      * the first writer that returns {@code true} is selected and returned.
      * 
-     * @param mediaType the media type of the data that will be written.
      * @param type the class of object that is to be written.
      * @param genericType the type of object to be written. E.g. if the 
      * message body is to be produced from a field, this will be
@@ -90,6 +89,7 @@
      * message body is to be produced from a field, this will be
      * the annotations on that field returned by 
      * <code>Field.getDeclaredAnnotations</code>.
+     * @param mediaType the media type of the data that will be written.
      * @return a MessageBodyReader that matches the supplied criteria or null
      * if none is found.
      */