wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat 5 - access logs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5 - access logs?" Watch "Tomcat 5 - access logs?" New topic
Author

Tomcat 5 - access logs?

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Hello,

Does anyone know how to configure Tomcat 5 so it creates access logs (like how my old Tomcat 4 did...).

Cheers,
James
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Would this not be more appropriate for the Tomact forum?

I do it pretty much the same in Tomcat 5 as I did on 4. The following is placed in every <Host> element:


This creates access log files in the $CATALINE_HOME/logs folder; one for each host (substitue 'whatever' with whatever makes sense).

Is this not what you are looking for?
[ August 10, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

James asked in a PM what file this declaration should be made within. I am answering here so that anyone else with the same question can see it.

This declaration should be placed within the server.xml file within the <Host> element for which you want to enable access logging.

Here, for example, is an entry from my server.xml (with the names changed to protect the innocent). Assume the host is www.whatever.com.



I posted the entire <Host> entry in case anyone finds the other portions informative (like how to enable the manager application for a virtual host).
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Yes, this thread does belong in the Tomcat forum. So I am going to move this to that forum, so that you guys can continue the discussion there.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Thanks for the reply.

I've checked out my server.xml files and they already have the line in that you gave me (with an additional resolveHosts="false"). But still no localhost_access_log files.

I notice I have two server.xml files. Could this be something to do with it? (Tomcat 5 can with the netbeans IDE I recently installed.) One server.xml file is at C:\Documents and Settings\jhodgski\.netbeans\3.6\jakarta-tomcat-5.0.19_base\conf. The other is at C:\Program Files\NetBeans3.6\jakarta-tomcat-5.0.19\conf.

Regards,
James
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
I've even re-installed NetBeans/Tomcat 5 but still no access_logs?

Does anyone have any suggestions?

(Could this have anything to do with me having two server.xml files?)
 
jQuery in Action, 2nd edition
 
subject: Tomcat 5 - access logs?