tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marius Hanganu" <mhang...@blazent.com>
Subject RE: Logging of illegal requests from Tomcat 5
Date Tue, 23 Aug 2005 08:41:33 GMT
You could log all requests using the access log valve:

        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log."
suffix=".txt"
                 pattern="common" resolveHosts="false"/>

(more about at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/printer/valve.htm
l)

And then filter the log file searching for the illegal requests.

Regards,
Marius

-----Original Message-----
From: Dariusz [mailto:dariusz1@nyc.rr.com] 
Sent: Monday, August 22, 2005 11:40 PM
To: tomcat-user@jakarta.apache.org
Subject: Logging of illegal requests from Tomcat 5

Hi,

    I am trying to log all illegal requests from Tomcat 5.  By illegal
requests I mean those that have return status code other than 200, i.e..
404 (Page Not Found)
403 (Forbidden), 408 (Request Timeout).  I am using log4j 1.2.9.
I display a custom error page for the above status codes and should be
able to create a custom error jsp page that will log those requests, but
there must be a better way of doing this.
Thanks.

--Dariusz.



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


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


Mime
View raw message