David Wall wrote:
>
> I think you have the best solution I've heard so far. Can each window have a
> separate servlet session? If so, how would I go about assigning a new
> session to the new window, since I obviously don't want to end the original
> session. Or is the trick to store "logical session" object(s) in the
> servlet session object and then do my own logical session lookups?
Damn! I just wrote a long reply to this mail but then netscape crashed
:-(
Anyway, here's a short version: You definite need to define you own
"logical sessions" and you also need to use URL rewriting (perhaps in
combination with cookies) to be able to separate resuests coming from
different windows.
As you point out, the problem is how to assign a new session to a new
window. I guess that most people would say that this is not possible in
a robust manner and perhaps that is true.
However, as I mentioned, I believe it is possible by using the referer
header. Whenever a user requests a page by following a link on an
existing page (from your web application), his/her browser will send a
referer header to the server telling which page (URL) the link was on.
If a user follows a link by typing it directly into the Location field
in the browser or by shift-clicking it so it opens in a new window, then
the browser will NOT send this referer header.
The point is, that if you on each request from a client checks the
referer header (along with all the usual session stuff), you will be
able to determine if a new window was activated.
I haven't tried this myself, so if you try it, please tell me if it
works.
Jesper
--
Jesper Jorgensen, CTO
CAPUT http://www.caput.com
Nygade 6, DK-1164 KBH K
Phone +45 33 12 24 42
Fax +45 33 91 24 42
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".