tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MartinOShea <app...@dsl.pipex.com>
Subject Programmatically detecting a login or logout using Apache Tomcat
Date Sun, 27 Jul 2008 19:40:01 GMT

Hello

I'm trying to find a way to detect a user logging into or logging out of an
application I'm working on. I want to record these events so that I know the
exact steps a user has taken through the application's JSPs and servlets. I
want to do this without reference to the Apache Tomcat server logs as well.

I have tried the following code in index.jsp (which is serving as each
user's home page):

<% if (request.getParameter("logoff") != null) {
       session.invalidate();
       response.sendRedirect("/myDataSharer/jsp/user/index.jsp");       
       return;
} %>  

And I have tried using variations like:

<% if (request.getParameter("logon") == true) {

But without success. 

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?

I'm using NetBeans 6.1 with Apache Tomcat 6.X.

Thanks

Martin O'Shea.

-- 
View this message in context: http://www.nabble.com/Programmatically-detecting-a-login-or-logout-using-Apache-Tomcat-tp18679788p18679788.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message