After some experimentation I found that the
availability of the request input stream is dependent upon the request mime
type. E.g. submission from an HTML forms default mime type is *not* available,
while text/xml-SOAP or multipart/form-data is.
I believe this is not the
correct behaviour, because the servlet spec(2.2) says:
Posted form data is only read from the input stream of the request
and used to populate the
parameter set when all of the following conditions
are met:
1. The request is an
HTTP or HTTPS request.
2. The HTTP method is POST
3. The content type is
application/x-www-form-urlencoded
4. The servlet calls any of the
getParameter family of methods on the request object.
If any of the
getParameter family of methods is not called, or not all of the above
conditions
are met, the post data must remain available for the servlet to
read via the request's input stream.
I have submitted this as bug 607.
--peter
