And possibly a HttpSessionActivationListener object as a session
attibute. The sessionDidActivate() method on the object gets called if
the session is still valid when tomcat restarts. You can use this to fix
your state.
HTH,
Jon
Mark Thomas wrote:
From: [EMAIL PROTECTED] [mailto:[EMAIL
was doing this in the SessionListener upon creation of the first session
and releasing when the last session went away. But since tomcat may be
saving session, I am getting a request and getting a nullpointerexception
now since the resource had not been allocated in web app startup.
How does one deal
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
So after a restart of tomcat, I login and it appears the
session is still
valid, so it does not go through my session listener.
I need to be aware of the web application lifecycle and want to grab a
resource when the webapp starts and
My web app has two servlets. One JSF Faces servlet and another servlet
for processing AJAX requests from javascript. I want to know when the
app starts and when the app is done. Is the only way to do this is to
have a ServletContextListener listening to both those servlets? On the
first one, I
whoops, nevermind. stupid question I found out after poking around.
dean
Dean Hiller wrote:
My web app has two servlets. One JSF Faces servlet and another servlet
for processing AJAX requests from javascript. I want to know when the
app starts and when the app is done. Is the only way to do
I am having issues with a SessionListener I have written. The purpose of
the Listener is to maintain a List of Active Users on the site. Here is
the code for the Listener.
// BEGIN CODE
public class ActiveUsersListener implements Serializable,
HttpSessionListener {
public static Set
in this listener so I could tell
exactly where it was failing.
Frank
Jacob Champlin wrote:
I am having issues with a SessionListener I have written. The purpose of
the Listener is to maintain a List of Active Users on the site. Here is
the code for the Listener.
// BEGIN CODE
public class
Kutzinski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 8:00 AM
Subject: Session expiry and SessionListener problems with cluster
Hi,
I'm just playing with the Tomcat 5.5.4 cluster and encountered 2 oddities:
a) If have left expireSessionsOnShutdown=false
for the variable, I agree
- Original Message -
From: Christoph Kutzinski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 8:00 AM
Subject: Session expiry and SessionListener problems with cluster
Hi,
I'm just playing with the Tomcat 5.5.4 cluster and encountered 2
Hi,
I'm just playing with the Tomcat 5.5.4 cluster and encountered 2 oddities:
a) If have left expireSessionsOnShutdown=false in the configuration
I understand that this will expire the session in the local node but
leave it alive in the other cluster nodes.
However I found out that the session
Dear List,
We are using a sessionlistener to count users. Is it possible for us to
use the request object somehow inside of the sessionCreated event? We want
to determine the client.locale and then store this in the session object.
This would therefore mean, we can determine the language GUI
No. The request is not accessible inside the sessionevent.
What you probably need to do is write a filter that sets that value in the
session (if a session exists).
-Tim
Ben Bookey wrote:
Dear List,
We are using a sessionlistener to count users. Is it possible for us to
use the request object
Hi there,
I have some tidying up to do on session destruction, which doesn't take
place when the context gets destroyed.
I am having a problem with my HttpSessionListener. It works fine when
the session is invalidated within tomcat by session.invalidate() (eg
when a user logs off), but the
ChemInformatics
-Original Message-
From: Elie Medeiros [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 7:56 AM
To: [EMAIL PROTECTED]
Subject: sessionDestroyed in SessionListener does not get called on
Context
destruction
Hi there,
I have some tidying up to do on session destruction, which
element in server.xml.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Elie Medeiros [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 7:56 AM
To: [EMAIL PROTECTED]
Subject: sessionDestroyed in SessionListener does not get called on
Context
destruction
Hi
Howdy,
Senor Basu, your solution is seriously not thread-safe. But that's for
you to worry about it, maybe it's good enough for your needs ;)
As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes
, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener
Howdy,
Senor Basu, your solution is seriously not thread-safe. But that's for
you to worry about it, maybe it's good enough for your needs ;)
As for Senor Hart's questions
AM
To: Tomcat Users List
Subject: RE: SessionListener
Howdy,
Senor Basu, your solution is seriously not thread-safe. But that's for
you to worry about it, maybe it's good enough for your needs ;)
As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
the authenticated user to their connection... better yet, the
hash, so it's a bit more optimal.
*SLAPS FOREHEAD!*
Justin
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:13 AM
To: Tomcat Users List
Subject: RE: SessionListener
Howdy,
Basic
Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:22 AM
To: Tomcat Users List
Subject: RE: SessionListener
How will the container get my user logged into the database? My plan
was
to use the username password to authenticate to my database so the
user
only
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:23 AM
To: Tomcat Users List
Subject: RE: SessionListener
Howdy,
Yes, now you got it ;) It's these simple misunderstandings that often
cause a lot of debate. As a bonus, your approach will work very well in
any J2EE container.
You
Justin,
Won't quite do it, JDBCRealm looks for users in a database, I want to
connect a user TO a database using their credentials, but the code to
do this feat will be quite minimal by comparison.
This will make it hard to use a connection pool (which you mentioned
that you do/want to do).
Is
Unfortunately, the paranoia is founded in this case, though I do agree.
Justin
-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 10:23 AM
To: Tomcat Users List
Subject: Re: SessionListener
Justin,
Won't quite do it, JDBCRealm
My SessionListener doesn't seem to be firing, any help?
I have a SessionListener that I want to go off when a user authenticates to my web app
(this is a correct usage, right?)
So, in the web.xml of my app, I would put the lines:
web-app
listener
listener-class
Ok, so, the listener in there must implement HttpSessionListener, where can I use
SessionListeners?
Justin
-Original Message-
From: Hart, Justin
Sent: Monday, December 01, 2003 11:34 AM
To: Tomcat Users List (E-mail)
Subject: SessionListener
My SessionListener doesn't seem
Howdy,
A SessionListener of the org.apache.catalina variety would go in the
same place as all tomcat-specific features:
$CATALINA_HOME/conf/server.xml. That means the class specified there
must be accessible to the server classloaders, i.e. must reside in
common/lib or higher on the classloader
Ok, still, I haven't found any documentation on how to add a SessionListener in the
server.xml file, and adding one using the listener tags defined for web.xml files
doesn't seem to work.
I also haven't seen how to get a user's credentials from a HttpSession, or how to get
a Session from
Howdy,
Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the
listener
tags defined for web.xml files doesn't seem to work.
The XML is the similar but not quite the same to the portable one:
listener className
: Monday, December 01, 2003 3:18 PM
To: Tomcat Users List
Subject: RE: SessionListener
Howdy,
Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the
listener
tags defined for web.xml files doesn't seem to work.
The XML
Sorry,
I should have added to this earlier, but I thought that SessionListener
should go in the web.xml document under the Listener element. Or am I
thinking about HttpSessionListener which is different
Anyways if it is HttpSessionListener that you are talking about I can
provide some
on a second time,
any way to get the username and password using HttpSessionListener without having them
retype the data?
Justin
-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 4:07 PM
To: Tomcat Users List
Subject: Re: SessionListener
Sorry
)
/jsp:expression
|/jsp:root
|/body
/html
/jsp:root
Hart, Justin wrote:
Ok, still, I haven't found any documentation on how to add a SessionListener in the server.xml file, and adding one using the listener tags defined for web.xml files doesn't seem to work.
I also haven't seen how to get a user's
somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
the session is invalidated...
http://java.sun.com/j2ee/1.4/docs/api/index.html
HTH,
Jon
Peter Maas wrote:
Hi,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session
/docs/api/index.html
HTH,
Jon
Peter Maas wrote:
Hi,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
Peter
Peter,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
I don't think you can 'veto' the destruction of a session, if that's
what you mean. All
What I actually want to do is call some destruct methods in objects
bound to the session...
P
Christopher Schultz wrote:
Peter,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called
.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
I don't think you can 'veto' the destruction of a session, if that's
what you mean. All the container will do is notify you that the
session is in the process of being destroyed.
-chris
I actually want to do is call some destruct methods in objects
bound to the session...
P
Christopher Schultz wrote:
Peter,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems
Peter,
What I actually want to do is call some destruct methods in objects
bound to the session...
Oh! Okay the session is completely in tact when this notifications
is received. So, you can certainly destruct those objects from the
sessionDestroyed method.
-chris
Peter Maas wrote:
Hi,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
Use Tomcat 5 ;-) The Servlet spec has been modified to do exactly what
you
Hi,
I wondered if there is a way detect somehting like a
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be
called after the session was destroyed.
Peter
-
To unsubscribe, e
: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 24. Juni 2002 18:28
An: Tomcat Users List
Betreff: RE: SessionListener does not get enough information
On Mon, 24 Jun 2002, tamir wrote:
Date: Mon, 24 Jun 2002 14:54:00 +0200
From: tamir [EMAIL PROTECTED]
Reply
On Tue, 25 Jun 2002, Software AG wrote:
Date: Tue, 25 Jun 2002 10:47:14 +0200
From: Software AG [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: AW: SessionListener does not get enough information
Hi, Craig.
I am
with a SessionListener,
since after some time all inactive sessions are discarded.
The problem is now that when the SessionListener.sessionDestroyed method is
called, all attributed have already been removed from the session, so I do
not really know what data needs to be deleted.
In my eyes the real solution
Hi Hiran,
I just bugged into this problem yesterday. I don't understand why the
sessionlistener is designed this way...
(Explanation please ?)
A workaround I thought, was to use the attributelistener instead.
When one attribute I choose is removed, I understand the next step is the
session
2002 13:25
An: Tomcat Users List
Betreff: SessionListener does not get enough information
I have a web application that stores some information into a database.
Now if the transaction is not complete (which means the
user did not go through a page asking do you want to save [y/n]?)
all
Another idea (I do not like HttpSessionBindingListener):
On sessionDestroyed you should be able to get Session ID information.
So just write your method:
MySessionDataDropper.drop(String sessionID) or (MyObject data)
which will drop all data identified by sessionID.
Imagine:
You have one
On Mon, 24 Jun 2002, tamir wrote:
Date: Mon, 24 Jun 2002 14:54:00 +0200
From: tamir [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: SessionListener does not get enough information
Hi Hiran,
I just bugged
Does anybody use SessionListener?..
I try to use this, but is absolutly an nightmare to
put everithing in place.
I cannot find a very clear documentation about how
the web.xml file should be set.
Alin
?
-- Bill K.
-Original Message-
From: Alin Simionoiu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:20 PM
To: [EMAIL PROTECTED]
Subject: SessionListener
Does anybody use SessionListener?..
I try to use this, but is absolutly an nightmare to put
or in the right
directory in the
WEB-INF/classes.
-
Robert
http://www.orangefood.com
-Original Message-From: Alin Simionoiu
[mailto:[EMAIL PROTECTED]]Sent: Thursday, May 17, 2001 2:20
PMTo: [EMAIL PROTECTED]Subject:
SessionListener
Does anybody use SessionListener?..
I try
that implements
HttpSessionListener, you need to specify this class in web.xml file.
Alin
- Original Message -
From: William Kaufman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 3:56 PM
Subject: RE: SessionListener
You mean HttpSessionBindingListener? (I can't find any
Sorry :)
I mean in Servlet API 2.3...
- Original Message -
From: Alin Simionoiu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 4:45 PM
Subject: Re: SessionListener
In Servlet API spec, which is in this moment in draft, is added the
concept
54 matches
Mail list logo