Hello
I wrote a
JSP and a
Servlet some time ago that both count the active sessions of a web application and display them.
To do that I wrote a class SessionCounter which implements HttpSessionListener and thus is being informed when a new session is created or a session has been destroyed.
Unfortunately there seems to be a problem with my program, because the web application says that there are currently -16 active sessions.
Maybe there is a problem within my code or some resources within the servlet engine (ServletExec 4.1) are not reset when restarted.
I hope someone can give me a hint.
Thank you in advance,
Christian
Code of JSP (similar in Servlets in other web applications):
Here's the class SessionCounter, which belongs to a utility JAR that is situated in the lib directory of each web application.