User logged only from one browser !

P

pincopallo_it

I get in my applications in this way :

In web.xml i have this
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/login-error.html</form-error-page>
</form-login-config>
</login-config>

the login.html is like this
......
<form method="POST">
<table class="colorNoMargin" border="0"
cellPadding="3"
cellSpacing="1">
<tr class="testata" >
<td colspan="2">
Login al Sistema
</td>
</tr>
<tr>
<td>
Utente:
</td>
<td>
<input
name="j_username" type="text">
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input
name="j_password" type="password">
</td>
</tr>
</table>
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Log
in">
</td>
</tr>
</form>


......



How can I send a message saying user is already logged in if the same
user is using the application from another pc/browser ?
Thanks
 
O

Oliver Wong

How can I send a message saying user is already logged in if the same
user is using the application from another pc/browser ?
Thanks

When a user logs in, set a flag. When a user logs out, unset the flag.

If a user tries to log in, and the flag is already set, then the user is
trying to log in twice.

Don't forget to implement a time-out for the flag, in-case their
computer crashed and they so they didn't explicitly log out.

- Oliver
 
P

pincopallo_it

.... but where do i save that flag ?
It cant be a session attribute neither a request attribute ...
am i wrong?
Thanks
 
O

Oliver Wong

... but where do i save that flag ?
It cant be a session attribute neither a request attribute ...
am i wrong?

Perhaps in a relational database associated with the user accounts?

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top