基本上只能用统计session的数目来实现
当然就是用HttpSessionListener接口里面的
sessionCreated()和sessionDestroyed()方法来统计了

解决方案 »

  1.   

    基本上只能用统计session的数目来实现
    当然就是用HttpSessionListener接口里面的
    sessionCreated()和sessionDestroyed()方法来统计了
      

  2.   

    ThreadGroup g = Thread.currentThread().getThreadGroup();
            
            int count = g.activeCount();
            Thread[] threads = new Thread[count];
            
            int c = g.enumerate(threads); 
            for(int i=0;i<c;i++)
            {
                out.println(threads[i].getName() + "<br />");
            }