tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Olofsson <si...@olofsson.de>
Subject Re: Allow Servlet to Control "100-continue" response
Date Sat, 18 Jun 2011 10:56:36 GMT
Rehtron,

On 2011-06-18 7:53, Rehtron wrote:
> I need to use the servlet  to control this response and accept/reject the
> request before receiving the request content, Is there anyone could give me
> some advice?

as you noticed it's too late when your Servlet is invoked: The request 
is already acknowledged.
You can use a Filter as mack Lu suggested or you could use a Valve, the 
following post [1] discusses the pros and cons. There's also a nice 
Tutorial on filters [2].

[1] http://blog.frankel.ch/tomcats-valve-an-alternative-to-filter
[2] 
http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message