File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Active Sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Active Sessions" Watch "Active Sessions" New topic

Active Sessions

Afroz Ahmed
Ranch Hand

Joined: Jan 18, 2004
Posts: 64

I am a me...

I am doing my application on tomcat servlet container.

1)I wanted to know how many sessions are running for my web application and the information of users,who were assigned to those sessions.

2)Can i stop a session from the list of sessions running,if i had permissions to do that.How to do that?

3)Can i restrict only one user can login at a time with a userid/pwd.
Such that no other person can login into my application with the same userid/pwd upto the first user is loggedout.How to do that?

Thanks & Regards
Afroz Ahmed

The value of an idea lies in the usage of it.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
You can add the user to the session as an attribute, after login. For restricting duplicate login, you can use SessionBindingListener and methods _Bound() and _unBound().
Gajanan C
Afroz Ahmed
Ranch Hand

Joined: Jan 18, 2004
Posts: 64
Hello Gajanan,

It is working fine for duplicate user.Thanks a lot.

Can you give me clarification regarding other probs too.

I agree. Here's the link:
subject: Active Sessions
It's not a secret anymore!