tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Laughton <>
Subject RE: Server Access Log and Request Information
Date Fri, 21 Oct 2005 21:59:03 GMT
Or if you are using commons logging

<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>


Log log = LogFactory.getLog(yourJsp1Name.class);"this message was writed from yourJsp1Name.jsp");

This way you will have all the record in one log file, but each can have 
its own identifier (depending on how you set up your "ConversionPattern" in 


At 11:38 PM 10/21/2005 +0200, Mauricio Fernandez A. wrote:
>If i understand what you want, you can do something like this.
>you can define a logger for each page (I think you have jsp`s), that causes
>that every record on the log file has its logger name on the log file.
>example: (if you are using log4j)
>your jsp´s must be like this: (yourJspName = your jsp name, that is to makes
>every log has the jsp name in the log file )
><%@ page import="org.apache.log4j.Logger" %>
>         Logger logger = Logger.getLogger(yourJsp1Name.class);
>"this message was writed from yourJsp1Name.jsp");
>and your log file will be like this:
>2005-10-21 23:20:52,275 INFO  org.apache.jsp.jsp.yourJsp1Name_jsp - this
>message was writed from yourJsp1Name.jsp
>I think this can help you identify which object are from which page but how
>to construct the table you want I think it is your problem analisys where
>you can find the answer.
>Mauricio Fernández A.
>Ingeniero de Sistemas
>U. Autónoma de Manizales
>-----Mensaje original-----
>De: TK []
>Enviado el: viernes, 21 octubre, 2005 20:44
>Asunto: Server Access Log and Request Information
>I am looking for ways to associate each object recorded in the log file with
>the corresponding page requested. Say, for example,
>  Page A contains objects p, q, r, s
>Page B contains onjects x, y, z
>  Requests for pages A & B, and objects p, q, r, s, x, y & z will be recorded
>in log file.
>  How could I identify p, q, r, s are embedded objects for page A while x, y,
>z are embedded objects for page B?
>  By doing so, I hope I could construct a user - accessed pages/objects
>  Thanks in advance for any advice and comments.
>   Cheers,
>To unsubscribe, e-mail:
>For additional commands, e-mail:

   John Laughton,            Cisco Systems
   408.902.3592 (voicemail and fax)
   page - 1 800 365 4578

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message