Computers are like air conditioners - They stop working properly when you open Windows
Originally posted by Umakanth Godavarthy:
When logging in with two browsers using the same user, same session id is getting created. But for one of our applicaiton feature to work we need to distinguish the requests received from these browsers. Is there a way to achieve this.
thanks in advance.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
So, whether there is one browser instance or multiple browser instances for a session, it is still the same session as all the browser instances share the same cookie.
I haven't tried it, but I would think that to get a separate session per browser would require the user to log in again using a separate browser instance.
Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
Just install a little hook which will provide unique user agent for every instance of a browser.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
A practical? Maybe, but your rquirements are very specific. I guess you do not support wap devices, text browsers and so on. So, your problem specifically is Windows and IE. You assume that flash player httpxml and other activex control registered on client machine, so why do not install one more? It's 10 seconds operation with one page confirmation. All other solutions may not work, because you can't distinct page refresh in the same window or a newly opened one. Good luck in finding a solution.Originally posted by Umakanth Godavarthy:
what do you mean by hook, it doesn't seem to be a practical solution. we cannot expect every client machine to install this hook or whatever.
Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
Originally posted by Umakanth Godavarthy:
what do you mean by hook, it doesn't seem to be a practical solution. we cannot expect every client machine to install this hook or whatever.
Originally posted by Jeanne Boyarsky:
Historically, all IE windows share a session. Netscape/Mozilla based browsers share a session if creating using Ctrl-N, but give you a different session if you launch the browser again.
Umakanth, You can solve this problem through design in your web application. On every page or link have a hidden form field with a unique id. If the id is passed to your servlet, use that id when rendering the next page's hidden form field. If not, it is a new window. In that case, increment the maximum id already given for that user in the session and send it with the request.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
|