tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: getting the request that created the session
Date Sun, 28 Apr 2013 11:21:03 GMT
Martin Gainty wrote:
> org.apache.catalina.valves.RemoteIPValve getRemoteIpHeader?
> Martin
...


>  > Date: Sat, 27 Apr 2013 23:08:31 +0200
>> Subject: getting the request that created the session
>> From: rosenberg.leon@gmail.com
>> To: users@tomcat.apache.org
>>
>> Hi,
>>
>> is there any possibility to get the first request from a session (or any
>> request from a session) from the HttpSessionListener.
>> Background, I want to count sessions by top level domains. I'm doing it now
>> in a combination of filter and listener. Filter for new sessions, putting a
>> mark for already counted sessions, and listener for destroyed session.
>> However, I would like to get rid of the Filter, if its possible somehow.
>> For that, I need to get user's ip adress somehow.
>>

For once, I find myself more or less in agreement with Marting here.
I am not sure that I understand exactly what you are trying to do, but just in case :
If your plan is to get rid of the filter :
If you set up an access log, you will get an access log file, which you can configure to 
include the client's IP address.
Than you can process that file off-line to extract whatever information you want, without

using up additional Tomcat resources.
There are even various programs available that will do this processing for you and 
generate nice tables and graphs etc. without further programming (webalizer, awstats and 
similar).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message