jQuery in Action, 3rd edition
The moose likes JSF and the fly likes session handaling in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "session handaling in servlet" Watch "session handaling in servlet" New topic

session handaling in servlet

pravin karne
Ranch Hand

Joined: Jul 26, 2007
Posts: 31
i want handle session(at login time) in my web application.i m using JSF as front end.
There are two case ,for disscus

1. If i login in my appication with different IE windows its working fine.
2. But when i use new window( suppose there is on Hyperlink ,i click on it and open it in new window same way open another window...Now i have two IE window)
i use these two window for two user to login into my application.
a.i loging with one user using one above window( i got his home page...successful login)
b. then i logged with anothere user with second window.( i got his home page..)but session between thse two user get shared.when i use first user page i m able to see second user's session data.

In short, if i use two child IE windows for loging into web application with two diffirent user seesion between two user get shared.

Plaese help me if any body knows these thing

Thanks in advance
Anil Sadineni

Joined: Feb 06, 2001
Posts: 20

Here session get getting shared because you opened a new window by clicking link on existing window. Now HTTP head of new request maintains same session id(cookie) as old window used to send request to server. Eventhough you have two windows, since your browser is sending same session id to server, server side there will be only one session maintained.

Hope it helps !!!

D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Something tells me if you use URL rewriting, then it will work.

How two users share the same PC and screen? Do you use VNC or something?

Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
I agree. Here's the link: http://aspose.com/file-tools
subject: session handaling in servlet
It's not a secret anymore!