• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exclusive access to a JSP  RSS feed

 
Richard Abbuhl
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to allow only one user to access a JSP at a time?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A filter?

What's the actual usecase? This is a requirement I haven't run across pretty much ever--allowing access to a resource, maybe; allowing write access to something, sure.
 
Richard Abbuhl
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is an old application which allows a user to import information. It is an involved processes and if two people do it in parallel it screws up the database.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you're really not trying to limit access to the JSP, but rather an underlying resource--and even then, only for the duration of the DB write.
 
Richard Abbuhl
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but it is several steps so I will put in a class which checks the database to see if a user is in the middle of an import. I can add this check to the JSP and if it returns true I can prevent access to the JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!