tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: HttpServletRequest.getReader() returns nothing
Date Tue, 28 Jul 2009 17:08:28 GMT
Hash: SHA1


On 7/27/2009 11:22 PM, Swati Rastogi -X (swrastog - Infosys at Cisco) wrote:
> I have removed all calls to getParameter family of methods on the
> request object and I can still see the issue. I have checked all
> servlet filters - No processing has been done on request object. This
> issue is seen when content-type=application/x-www-form-urlencoded.
> Issue is not seen when content-type=text/xml.

As Martin pointed out, using text/xml does not satisfy the requirements
of the servlet container to parse stdin into parameters.

> Two questions
> A) How to know from where getParameter is being called from the code?

Write a filter or valve, wrap the request and override the getParameter
family of methods to dump stack traces when they are called. Install
your filter as the /first/ filter in the call chain (by mapping it at
the top of the <filter-mapping> elements in web.xml). Especially if you
are using a web application framework, these calls can be made without
you realizing they are happening.

> B) Is it okay to use content-type=text/xml

It is definitely okay to use text/xml, though application/xml is often
used as well.

- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message