| Author |
Where to write this method in my application?
|
Ravi Kumar Ravuru
Ranch Hand
Joined: Apr 18, 2002
Posts: 176
|
|
Hello Folks, I had a application which is deployed on IBM Websphere Application Server 4.0.1 Advanced Edition for MultiPlatforms.The application is abt tracking of users which consists of Jsps and EJBs.Where should i write the methods for HttpSessionListener in my application.Please give me the suggestions. Thanks in Advance. Ravi
|
 |
prabhat kumar
Ranch Hand
Joined: Apr 11, 2001
Posts: 114
|
|
create a class which should implement that httpsessionlistener interface and then put it in the session. in this you can implement the methods and do work like initializations and cleanup.
|
 |
Ravi Kumar Ravuru
Ranch Hand
Joined: Apr 18, 2002
Posts: 176
|
|
Hello Prabhat, Thanks for your response.Can u send me a piece of code related it. Thanks in advance. Ravi
|
 |
prabhat kumar
Ranch Hand
Joined: Apr 11, 2001
Posts: 114
|
|
Here is it. edit it to suit ur needs
|
 |
Ravi Kumar Ravuru
Ranch Hand
Joined: Apr 18, 2002
Posts: 176
|
|
Hello Prabhat, Thanks for the code.Just one more question.How do i keep this class in the session object and track the users. Thanks in Advance. Ravi
|
 |
Garrett Smith
Ranch Hand
Joined: Jun 27, 2002
Posts: 401
|
|
The idea is to use place this in application scope. Use a Hashtable to store users in. Store the hashtable in the application scope. You can modify the code in the previous post to do this. Then when a session expires, you have to have an event hook to log them out. You do this by implementing the HttpSessionListener interface. Below is a sample of this.
|
comp.lang.javascript FAQ: http://jibbering.com/faq/
|
 |
 |
|
|
subject: Where to write this method in my application?
|
|
|