Is it possible to check if any request has hit the Tomcat? something similar to access.log of Apache server. I am using Tomcat 6.
Apache Tomcat provides the configuration directory conf, that contains the file server.xml. At the bottom of this file, a line that includes the adjustments valve, called AccessLogValve must be un-commented and changed.
The default valve parameters and patterns can easily be modified, either through an editor, or by an application. This is a reasonably detailed log file that can be used for access metrics:
<Valve
className="org.apache.catalina.valves.AccessLogValve."
directory="logs"
prefix="sitename_acc."
suffix=".log"
pattern='%a %A %b %B %h %l %m %p %q %u %t "%r" %s %U %D %S'
resolveHosts="false"
rotatable="true"
fileDateFormat="yyyy-MM-dd"
/>
You can even have multiple tomcat instances running at the same time, each with it's own access log file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With