Browsers typically don't differentiate between separate windows of a
session. So to get the behavior you want, you have to essentially do your
own session management. Include a unique id as a parameter on every URL of
your system, passing it into and out of every JSP (create the id when the
user comes to your opening page). Use that key to store your tree objects in
the servlet context (application scope, in JSP terminology) manually. That
way, every window will be considered a separate session, and you won't have
the problem.

--Jim Preston


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Frederik Delacourt
Sent: Tuesday, July 25, 2000 4:38 PM
To: [EMAIL PROTECTED]
Subject: Session management and window differentiation


All,

I'm trying to manage information into a session and I'm facing a little
problem.

Let assume that I have a JSP page that displays a tree and keep the
TreeModel in session. Let's assume now that from my browser I'm requesting
the jsp page and manipulate the tree by expanding and collapsing different
node. My TreeModel in session will be impacted.
The problem is if I'm opening an other window (File>New Window in MSIE),
then I will have the same page display and so the same tree with the same
node expanded and collapsed than the original window. Expanding & Collapsing
any node in one window will do the same in the other one.

Is there any possibility to detect that we are not in the same window than
the one used for creating the tree originally from the JSP?

Thanks,

Fr�d�rik Delacourt
-----------------------
"A mind once stretched by a new idea never regains its original
dimension." --Oliver Wendell Holmes

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to