2013/4/28 Leon Rosenberg <rosenberg.l...@gmail.com>:
> Hi,
>
> is there any possibility to get the first request from a session (or any
> request from a session) from the HttpSessionListener.

No. It is not possible to get request from within a 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.
>

Just two ideas:

1. You can use javax.servlet.ServletRequestListener instead of a filter.
2. There is HttpSession.isNew() method.

Best regards,
Konstantin Kolinko

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

Reply via email to