tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joe user <paleha...@yahoo.com>
Subject RE: Logging filter (was RE: [next] What's next ?)
Date Thu, 02 Oct 2003 16:51:28 GMT

--- "Shapira, Yoav" <Yoav.Shapira@mpi.com> wrote:
> That's unfortunate ;(

Yes it is.  Those methods may not really belong in the
Filter interface, though.  That's why I think it may
be a better idea to start thinking about a real API
for more of the core components of the server:
logging, classloading, network interface, etc.  This
would not have to be part of the Servlet
specification, because it's a separate issue.  Maybe
this could be called the Jakarta Container API or
something.  Just a few simple interfaces (starting
with logging perhaps) would be very handy.  Does
anyone think this is interesting?

> getContentType() is there, actually, in

Ah, it's good that getContentType() is there.  That is
new I think.

> In fact, why aren't there methods like
> getHeader(String name) and
> getContentLength() in the ServletResponse interface?
>  Can someone
> familiar with the Servlet Specification comment on
> this?

I think that many of those values, such as
ContentLength, are not known until all the webapp
stuff is completely done touching the response.  The
filter could change the response in some way at any
time, so those values cannot be set.  Also, values
like the response code cannot be known because if
there is a Java error ANYWHERE in the webapps's chain
of processing, including in a logging filter, that
changes the response code.  Filters sound like a good
way to do this but I don't think they're exactly the
right level for it.  But there should be an exposed,
supported API for writing custom logging.  It is
something which so many people need to do.


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Mime
View raw message