Hello Everybody, I need a small help from you.Im new to session tracking and I want to maintain the sessions for the user login based on the username.i.e I should not allow the user to take up a online test or so if he is not logged or not registered yet.Can anyone please send me the code for my problem. Expecting the needed help from U, Have a nice time. Bye
We can check whether the names match, to ensure that the current user is the authenticated one.
How swamy?? match the name in the session with which name?? Or we have to get a name with every request to match with the existing name in the session.
Why not just check the name from session. if we get some name then alright the user is authenticated, otherwise we will get null.
isn't it better to place logged in users in application context scope then we can check whether the user, made the request, is logged in or not. Moreover we can avoid multiple logins by same user. again we have to get a name in every request.
Joined: Aug 31, 2004
Thanks a lot for pointing that out.
Did not think of that one mate....I get it now. It's definitely a better way.