Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I configure Tomcat to log requests with the HTTP DELETE verb to the access.log? By default it only seems to be logging GET, PUT and POST.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Prior to version 6.0.30, tomcat would not log requests in the access log if they were rejected before they reached the AccessLog Valve. I think your issue is related to Bug 50201 (Tomcat Bugzilla 50201 Report)

Interestingly, you can duplicate the problem with GET requests just by sending a badly formed GET request. Tail the access log, open a console window and type: telnet localhost 8080 (or whatever you're tomcat http port is). Then type: GET /good_request.html Tomcat will respond with the default 404 page (or a custom one if you have that configured) and you'll see the 404 in the access log. Connect again and then type GET /bad_request.html HTTP/1.1 Tomcat will respond with the expected 400 - Bad Request status code but the request will not get logged in the access log.

It seems like the only information I've been able to find to remedy this problem is to upgrade tomcat to a version greater than or equal to 6.0.30.

share|improve this answer
    
Not sure this is entirely the problem - GET and POST are logged fine, as I said. It appears only DELETE isn't making it through, furthermore until recently DELETE handling itself was working, so I presume it hasn't been turned off or disallowed. –  cbz Jun 16 '11 at 14:21
    
The problem doesn't prevent the method from working or getting whatever the expected responses are. Just that the request is not getting logged. –  mahnsc Jun 16 '11 at 15:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.