File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to maintain same cookie values for multiple windows login accounts from the same system ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to maintain same cookie values for multiple windows login accounts from the same system ?" Watch "how to maintain same cookie values for multiple windows login accounts from the same system ?" New topic
Author

how to maintain same cookie values for multiple windows login accounts from the same system ?

Alex Swami
Greenhorn

Joined: Nov 11, 2013
Posts: 1
Hi !

I am facing a problem in ensuring that the cookie values being set from my site is not remaining the same for all the windows login accounts from a system.

user behavior:
user right clicks on IE browser and uses "run as" to login multiple times from available windows accounts and logs into the website.

as a result of this i am not able to restrict the ability to have multiple logins in the website from the same/single windows system.

under normal circumstances , with 1 windows account we can ensure that users cannot carry out multiple logins by validating against cookies already written. but this fails when the "run as" feature of windows application is used for multiple windows accounts.

my code for setting and validating cookies :

setting cookie code snapshot :

java.util.Date now = new java.util.Date();
String timestamp = now.toString();
Cookie cookie = new Cookie ("ABC","01561987");
cookie.setMaxAge(3600 * 7);
cookie.setComment("XYZ");
cookie.setPath("/");
response.addCookie(cookie);

kindly help !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Nothing to do with Servlets, so moved to the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

There's nothing that you can do. That's just the way that IE works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to maintain same cookie values for multiple windows login accounts from the same system ?