Re: SessionListener invoked sometimes and not others

2005-10-10 Thread Jon Wingfield
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

SessionListener invoked sometimes and not others

2005-10-08 Thread dean
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

RE: SessionListener invoked sometimes and not others

2005-10-08 Thread Mark Thomas
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

Re: SessionListener invoked sometimes and not others

2005-10-08 Thread Dean Hiller
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

Re: SessionListener invoked sometimes and not others

2005-10-08 Thread Dean Hiller
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

Concurrency Issue With a SessionListener.

2005-05-03 Thread Jacob Champlin
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

Re: Concurrency Issue With a SessionListener.

2005-05-03 Thread Frank W. Zammetti
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

Re: Session expiry and SessionListener problems with cluster

2004-12-10 Thread Filip Hanik - Dev
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

Re: Session expiry and SessionListener problems with cluster

2004-12-10 Thread Christoph Kutzinski
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

Session expiry and SessionListener problems with cluster

2004-12-09 Thread Christoph Kutzinski
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

Using request.getLocale() inside of the sessionListener event

2004-09-24 Thread Ben Bookey
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

Re: Using request.getLocale() inside of the sessionListener event

2004-09-24 Thread Tim Funk
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

sessionDestroyed in SessionListener does not get called on Context destruction

2004-03-09 Thread Elie Medeiros
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

RE: sessionDestroyed in SessionListener does not get called on Context destruction

2004-03-09 Thread Shapira, Yoav
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

RE: sessionDestroyed in SessionListener does not get called on Context destruction

2004-03-09 Thread Elie Medeiros
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

RE: SessionListener

2003-12-02 Thread Shapira, Yoav
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

RE: SessionListener

2003-12-02 Thread Hart, Justin
, 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

RE: SessionListener

2003-12-02 Thread Shapira, Yoav
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

RE: SessionListener

2003-12-02 Thread Hart, Justin
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

RE: SessionListener

2003-12-02 Thread Shapira, Yoav
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

RE: SessionListener

2003-12-02 Thread Hart, Justin
[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

Re: SessionListener

2003-12-02 Thread Christopher Schultz
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

RE: SessionListener

2003-12-02 Thread Hart, Justin
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

SessionListener

2003-12-01 Thread Hart, Justin
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

RE: SessionListener

2003-12-01 Thread Hart, Justin
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

RE: SessionListener

2003-12-01 Thread Shapira, Yoav
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

RE: SessionListener

2003-12-01 Thread Hart, Justin
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

RE: SessionListener

2003-12-01 Thread Shapira, Yoav
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

RE: SessionListener

2003-12-01 Thread Hart, Justin
: 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

Re: SessionListener

2003-12-01 Thread Atreya Basu
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

RE: SessionListener

2003-12-01 Thread Hart, Justin
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

Re: SessionListener

2003-12-01 Thread Atreya Basu
) /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

Re: SessionListener

2003-11-13 Thread Jon Wingfield
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

Re: SessionListener

2003-11-13 Thread Peter Maas
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

Re: SessionListener

2003-11-13 Thread Jon Wingfield
/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

Re: SessionListener

2003-11-13 Thread Christopher Schultz
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

Re: SessionListener

2003-11-13 Thread Peter Maas
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

Re: SessionListener

2003-11-13 Thread Tim Funk
. 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

RE: SessionListener

2003-11-13 Thread Tatu Vanhanen
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

Re: SessionListener

2003-11-13 Thread Christopher Schultz
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

Re: SessionListener

2003-11-13 Thread Jean-Francois Arcand
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

SessionListener

2003-11-12 Thread Peter Maas
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

AW: SessionListener does not get enough information

2002-06-25 Thread Software AG
: 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

Re: AW: SessionListener does not get enough information

2002-06-25 Thread Craig R. McClanahan
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

SessionListener does not get enough information

2002-06-24 Thread Software AG
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

RE: SessionListener does not get enough information

2002-06-24 Thread tamir
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

AW: SessionListener does not get enough information

2002-06-24 Thread Ralph Einfeldt
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

Re: SessionListener does not get enough information

2002-06-24 Thread Gabriel Gajdos
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

RE: SessionListener does not get enough information

2002-06-24 Thread Craig R. McClanahan
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

SessionListener

2001-05-17 Thread Alin Simionoiu
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

RE: SessionListener

2001-05-17 Thread William Kaufman
? -- 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

RE: SessionListener

2001-05-17 Thread Robert Petersen
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

Re: SessionListener

2001-05-17 Thread Alin Simionoiu
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

Re: SessionListener

2001-05-17 Thread Alin Simionoiu
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