This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes limiting the number of user logging an application to a specific number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "limiting the number of user logging an application to a specific number" Watch "limiting the number of user logging an application to a specific number" New topic
Author

limiting the number of user logging an application to a specific number

prakash pawar
Ranch Hand

Joined: Mar 11, 2010
Posts: 42
Hi All,

Can we restrict the number of user logging an application from Web.xml


Regards,
Prakash Pawar.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I also have same problem?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
The Servlet specification makes no provisions for this, so you'll have to implement it yourself. It sounds pretty easy to do.


Ping & DNS - updated with new look and Ping home screen widget
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

Take a look at servlet listeners to see when sessions are created/destroyed. Note that if people close the browser without logging out, you won't know until the session times out.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
count a number of users loged in using listener and restrict them loging when the limit is become.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: limiting the number of user logging an application to a specific number
 
Similar Threads
Is there a way to know how many HttpSession Objects in the container?
Logging in Struts
How Tomcat Works book - development question
B&S Locking Test
Logging + User Experience