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:[EMAIL PROTECTED] 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to