Bogdan Diaconescu wrote:

> Hi Craig,
> I'm working on an embedded Java machine wich is conducting an automation
> process through web interface. All the users are "trusted" so there is no
> security problem from our point of view. But what I'm trying to accomplish
> is to allow just one user to issue commands at one time until he/she sign
> off. I know there are more other solutions but I was trying using sessions.
>

One way to deal with this would be to create a JavaBean that implements
HttpSessionBindingListener, and have your "log in" logic add this bean to the
user's session.  When the bean's valueBound() method is called, it can register
itself in some shared collection of currently logged in users (perhaps in a
servlet context attribute), and can remove itself when valueUnbound() is
called.

> Thanks.
> Bogdan
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to