markt-2 wrote:
> 
> MartinOShea wrote:
>> I have used request.getRemoteUser() at various points in the application
>> to
>> identify the current user when they are authenticated by Apache Tomcat.
>> However, request.getRemoteUser() does not tell me when the  user logged
>> in
>> or off.
> request.getRemoteUser() tells you if the user is authenticated.
> 
>> Does anyone know a way that the login and logout events can be recorded
>> by
>> an event in a program, a session object and so on?
> Have you looked at session listeners?
> 
> It depends what you mean by login and logout.
> If login is the transition from request.getRemoteUser()==null to 
> request.getRemoteUser()!=null and logout is when the session is
> invalidated 
> then a combination of request.getRemoteUser() and a session listener
> should 
> be all you need.
> 
> Mark
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


Mark

By login or logout, I mean the actual physical login and logout actions by
the user concerned which I expect translate to request.getRemoteUser()==null
for logout and request.getRemoteUser()!=null for login. But I'm not familiar
with session listeners so I will be looking at them later.

Do you have any sample code at all?

Thanks

Martin O'Shea.
-- 
View this message in context: 
http://www.nabble.com/Programmatically-detecting-login-or-logout-events-tp18685933p18686159.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to