?
Solved

How to allow only single login to a web application

Posted on 2009-04-02
3
Medium Priority
?
339 Views
Last Modified: 2012-05-06
Hi,

My web app is based on struts. My question is as follows

I have logged in using my username and password and again i have accessed the application in another tab or in another browser in the same system. at that time it should not ask the user to login again. It has to display the page of the previous user.

Fopr example, take gmail. If i am logged in with a username and password and again if i am accessing the gmail in another tab, it will open the logged in page of the user. so that i have to logout first and then only i have to login with whatever teh username and password might be

Hope you understand. please let me know if you need any further info in this regard.

0
Comment
Question by:CIPL-Senthil
3 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 1000 total points
ID: 24056819
You need to use SESSION to handle for single user auth ... If you have session on the another tab page, then you can handle it.

Normally, all the web application have like this idea?

didn't you use SESSION?
0
 

Author Comment

by:CIPL-Senthil
ID: 24060623
Thank you


But already we are knowing this.  But We want to know any other possibility exists for this

Any ore suggestions...
0
 
LVL 4

Expert Comment

by:sprisoner
ID: 24070560
If you are using a database, whenever user logs in, store the logged time and a flag as true in database. Let every page check this value and if user has logged in recently, you can skip the login part.

Here, you need to login time, because you do not want the user flag to be true always. So check the flag as well as time (for eg. has the user logged in and in last 20 mins?), then no check, else ask to relogin.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Suggested Courses

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question