Hello Konstantin, thank you for your reply.
> 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. > > > > Just two ideas: > > 1. You can use javax.servlet.ServletRequestListener instead of a filter. > 2. There is HttpSession.isNew() method. > So you mean that I can basically perform the same checks I do in a filter in a servletrequestlistener, checking if there is an attached session, if it's new, and where it comes from. I haven't found it in the spec (or didn't search hard enough, at least haven't found it in listener section), would ServletRequestListener being notified prior to any Filter execution? regards Leon > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >