logo       

Re: session count in resin 2.1.11: msg#00067

text.xml.resin.user

Subject: Re: session count in resin 2.1.11

I just developed this functionality this weekend. I use a HttpSessionListener to increment and decrement the user count in the sessionDestroyed and sessionCreated methods. I used a filter to get some information on referers, time spent on the site, number of pageviews etc.
 
The benefit of this approach compared to the built-in Resin classes is portability.
 
 
Vidar
 
----- Original Message -----
From: Qiao Jin
Sent: Monday, March 08, 2004 7:55 PM
Subject: session count in resin 2.1.11

Hi,
 
What is the best way to get a count of current live sessions? I tried using ApplicationAdmin and ServerAdmin but got "cannot resolve symbol" errors on them from the comipler. I see com.caucho.http.admin in resin.jar and resin.jar iss on the classpath. Any idea? Thanks -Qiao
 
== status.jsp ==
 
<@page import="com.caucho.http.admin.*" %>
<%
ApplicationAdmin appAdmin = new ApplicationAdmin(application);
HostAmdin hostAdmin = appAdmin.getHostAdmin();
ServerAdmin serverAdmin = appAdmin.getServerAdmin();
 
%>

<html>
<body>
<p>
<br>appAdmin.getActiveSessionCount() : <%= appAdmin.getActiveSessionCount() %>
<br>
<br>hostAmdin.getName(): <%= hostAmin.getName() %>
<br>
<br>serverAdmin.getActiveConnectionCount(): <%= serverAdmin.getActiveConnectionCount() %>
<br>serverAdmin.getConnectionCount() : <%= serverAdmin.getConnectionCount() %>
<br>
</body>
</html>
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise