On our system (closed system, java web application in tomcat 6 as a server, java fat clients), our clients sometimes show "400 - Bad Request" responses. I would like to debug this on the server side, but since the requests seem invalid, I don't see them anywhere. I configured AccessLogValve for the full tomcat node, but requests are not displayed there. I donβt even see anything in katalin.
I would really like these requests to be logged, and it would be even better to drop requests based on certain criteria.
Any ideas?
My server.xml looks like this:
<Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="off" /> <Listener className="org.apache.catalina.core.JasperListener" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiServerPortPlatform="9098" rmiRegistryPortPlatform="9099" useLocalPorts="true" /> <Service name="Catalina"> <Connector port="8020" protocol="HTTP/1.1" redirectPort="8010" connectionTimeout="20000" /> <Engine name="Catalina" defaultHost="localhost" jvmRoute="cc1"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" deployOnStartup="true" xmlValidation="false" xmlNamespaceAware="false"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="access_log." suffix=".txt" pattern="combined" resolveHosts="false" /> </Host> </Engine> </Service> </Server>
source share