Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes Tomcat 404 - how to log bad url? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 404 - how to log bad url?" Watch "Tomcat 404 - how to log bad url?" New topic
Author

Tomcat 404 - how to log bad url?

M Conlin
Greenhorn

Joined: Aug 01, 2005
Posts: 15
I want to capture the bad URL when a 404 is thrown.

The only way I do this so far is to have the tomcat log4j.properties set to DEBUG, this creates a HUGE amount of logging.

Are there any other ways to get this information... when the URL is bad I want to see what it was they wanted.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you turn on access logging (uncomment its entry in server.xml) you'll have a typical log that can be parsed with programs like webalizer.
This has log entries for every hit, including the response code.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 404 - how to log bad url?
 
Similar Threads
Custom 404
custom 404 error page
How to get the url of the page causing the 404 in custom error.jsp?
disable tomcat version display
cannot connect to tomcat