Leo Donahue - RDSA IT wrote:
_______________________________________
From: Leon Rosenberg [rosenberg.l...@gmail.com]
Subject: Re: getting the request that created the session

 would ServletRequestListener being notified prior to any Filter execution?

According to the docs, yes.

"A ServletRequest is defined as coming into scope of a web application when it is 
about to enter the first servlet or filter of the web application, and as going out of 
scope as it exits the last servlet or the first filter in the chain."

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequestListener.html

Leon,
I apologise for insisting, but your initial post said :
"Background, I want to count sessions by top level domains..."

It was probably politically a bad idea to start by saying that I agreed with 
Martin. ;-)

But if the above is really your final purpose, and the final purpose is more important than the way in which you get to it, would it not be simpler and more efficient to do this by processing the server's access log, rather than going through all you're going through right now ?

Tomcat's AccessLog Valve is indeed specific to Tomcat.
But webserver access logs exist on all webservers, and they tend to have the same general format, and contain the same general information (which you can generally also choose yourself). And the programs to read and process them already exist and are widely used. And they do provide an analysis that shows "unique users" and/or "sessions", based on the client's IP (with some filtering already possible and tunable, such as avoiding to count your own "admin" accesses e.g.). And they will resolve the IP's to domains and provide a break-down by domain etc. Have you looked at one such outputs already ? (If not, I can send you a link to an example, privately)

I understand that it is less interesting to do it this way than through Request Listeners etc., but if the end result is what really matters..

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

Reply via email to