Hi guys,
i've a question for you.
I'm developing a jsf application and i've a question about login.
I want securing my applicatio,tha is if a user enters with one username
and password,during its navigation,another user can't enter with same
data.
My first solution has been setting one loggedIn property in my user
table to 1 when user enters application.
If another user try to enter with same data,loggedIn=1 stops it.
When one user logout,loggedIn became=0.
It works fine until user enter and leave out correctly.
How can i do if user close browser without logout?
Can you help me improving my solution or giving me another one?
Thanks very much
Moiristo - 15 Sep 2006 22:07 GMT
> Hi guys,
> i've a question for you.
[quoted text clipped - 10 lines]
> Can you help me improving my solution or giving me another one?
> Thanks very much
I would suggest that you use a session listener to reset the flag when a
session is destroyed. You can declare one in the web.xml like this:
<listener>
<listener-class>myproject.util.SessionListener</listener-class>
</listener>
This is only an idea, I have never used it and therefore I can't give
you any sample code. However, there should be enough information
available on the web.