How to log the content-type??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to log the content-type??

Juan Manuel Soler Rincón
Hi

Someone know how to log the content-type of any request??

Thx


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to log the content-type??

Tim Funk
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: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...