tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: ServletRequestListener and Expect-Header
Date Wed, 29 Jun 2011 00:45:43 GMT
Hash: SHA1


On 6/9/2011 2:20 PM, André Warnier wrote:
> As I read the API for the ServletRequestListener, I understand that this
> thing is called very early in the cycle.  The spirit seems to be :
> provide a way to warn as soon as possible that a servlet request has
> come in.
> Perhaps even, before we even know that it is really a /HTTP/ servlet
> request.

The container certainly knows what type is is. I would guess that a
typical scenario is to immediately check to see if the request is an
instance of HttpServletRequest, and then take some appropriate action.

> Now, /if/ it is a HTTP servlet request, (and particularly a POST
> request) then the fact of calling ServletRequest.getParameter(x) would
> force, at that point, the parsing of the request, headers and body, as a
> HTTP request.

Yes, it would.

> But what if it is not a HTTP request ?

Then the getParameter* methods may have other semantics.

> I guess that my question could be rephrased as : is Tomcat a Java
> servlet engine, or just a Java HTTP servlet engine ?

It's a servlet engine, but the only widespread implementations of the
ServletRequest interface are those that also implement the
HttpServletRequest interface.

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


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

View raw message