You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Juan Manuel Soler Rincón <ju...@uniandes.edu.co> on 2005/05/07 00:06:01 UTC
How to log the content-type??
Hi
Someone know how to log the content-type of any request??
Thx
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: How to log the content-type??
Posted by Tim Funk <fu...@joedog.org>.
Sort of ...
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html
But AccessLogValve doesn't support outgoing headers for logging. But a
workaround is the create a filter which catches the
HttpServletResponse.setContentType and sets the ContentType as a
ServletRequestAttribute so you can use this syntax in a custom pattern when
declaring the AccessLogVavle.
%r{myContentTypeVariable}
-Tim
Juan Manuel Soler Rincón wrote:
> Hi
>
> Someone know how to log the content-type of any request??
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org