On Sat, 30 Apr 2005, Michael Wechner wrote:

> Michael Wechner wrote:
>
> > Hi
> >
> > It seems to me that we could implement the feature of
> >
> > "showing logged-in users" with
> >
> > http://www.javaworld.com/javaworld/jw-01-2001/jw-0126-servletapi-p2.html
> >
> > (was recently posted by Reinhard Poetz on the Cocoon mailing list)
>
>
> we could add to the web.xml something like
>
> <listener>
>   <listener-class>org.apache.lenya.cms.servlet.UserLogger</listener-class>
> </listener>
>
> and implement
>
> public class UserLogger implements HttpSessionListener {
> ...
>

I did try to do this starting with a simple example i.e. a listener which
only counts the active sessions. This works quite well now but i noted
that a logut did not invalidate the session (meaning that if a user did
log out i still had the same number of sessions).
The reason is that session.invalidate(); is not called in logout.xsp. If
i add it to login.xsp:

<xsp:content><uri><xsp-request:get-context-path/><xsp:expr>uri</xsp:expr></uri></xsp:content>
         }
       }
+      session.invalidate();
     }
   </xsp:logic>
 </logout>

i got the proper number of sessions. Is this a bug or is
session.invalidate not called on purpose?

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to