Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

J2EE - How to share tomcat sessions across multiple IE windows

Thread view: 
Adam Lipscombe - 10 Oct 2007 09:59 GMT
Folks,

My app spawns another window to display help, via the window.open() javascript call.

The new window does not share the same session as the original, the session ID is always different.
Occasionally the ID of the new window is that of a session that has expired so the help does not
display.

I think his behaviour is IE specific, I found a couple of (non tomcat) explanations here:

http://classicasp.aspfaq.com/general/how-do-i-manage-a-session-across-multiple-w
indows.html
.
http://de3.php.net/session-start

In the latter it says:
"The problem is that IE doesn't always use the same IE process to host a new pop-up window - it
chooses one (using some mysterious strategy) from the pool of running IE processes! Since session
information (cookies) is not preserved across processes, the pop-up may loose the session (and
probably redirect the user to your log-in page.)"

Does anyone know how to make the new window use the same session as the original window?
Or at least use a brand-new session rather than a recycled old one?

TIA - Adam
Arne Vajhøj - 12 Oct 2007 01:22 GMT
> My app spawns another window to display help, via the window.open()
> javascript call.
[quoted text clipped - 21 lines]
> original window?
> Or at least use a brand-new session rather than a recycled old one?

I will not call it off topic, but you may want to broaden your search,
because this is a pure client side issue and is independent on whether
you use J2EE or ASP.NET or PHP or something else.

Arne
Andrew Thompson - 12 Oct 2007 03:17 GMT
...

The problems with this web-app. will continue, while it uses
pop-ups.  

>...window use the same session as the original window?

Don't use pop-ups.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Adam Lipscombe - 12 Oct 2007 09:31 GMT
Andrew,

I completely agree - I have fought long and hard to get rid of them.
But the "style gurus" love them - they think it gives a thick-client desktop feel to the app, and
try as I might I cannot convince them otherwise.

Is there way around this problem?

Thanks - Adam

> ..
>
[quoted text clipped - 4 lines]
>
> Don't use pop-ups.
Andrew Thompson - 12 Oct 2007 09:53 GMT
...
>I completely agree ..

(looks up) With what?  Please refrain from top-posting,
I find it very confusing.

>..- I have fought long and hard to get rid of them.
>But the "style gurus" love them - they think it gives a thick-client desktop feel to the app, ..

Sure, but it gives me (as the end user) the feel they
spared a tiny expense to try and convince me I was
dealing with a rich client.  It does not work, under the
'thin veneer' is still the same, crappy old browser that
was never intended to host 'rich client' UIs.

If a 'rich client' is called for, use a (damnable) rich client,
rather than these '..(piss-)poor cousins of a rich client'.

>..and
>try as I might I cannot convince them otherwise.
>
>Is there way around this problem?

1) Fire the 'style gurus' and hire some Swing programmers.(?)
2) See Arne's suggestion.  But then, I suspect the HTML
gurus will tell you much the same as I did, at much greater
length (and possibly volume*), before saying it 'cannot be
done (reliably, in any case)'.

* They hate pop-ups - probably much more so, than the
average end user.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Adam Lipscombe - 12 Oct 2007 16:56 GMT
Andrew

>Please refrain from top-posting

Why? Because you say so? Is that not a tad pedantic?
That is the way my mailreader does it.
My post was not a long one and is not difficult to comprehend.

> I find it very confusing.
You get confused easily.

> Fire the 'style gurus' and hire some Swing programmers.(?)
Are you seriously suggesting Swing in a webapp?

> * They hate pop-ups - probably much more so, than the
> average end user.
The feedback from users is that our app looks great. And (sadly from my perspective) there are loads
of popups. They love it.

Anyway, I have found a way round it - adding the session ID to encoded URLs that are to be opned in
a nww window.

Have a nice weekend :-)

Cheers - Adam

> ..
>> I completely agree ..
[quoted text clipped - 27 lines]
> * They hate pop-ups - probably much more so, than the
> average end user.
Arne Vajhøj - 13 Oct 2007 02:26 GMT
>  >Please refrain from top-posting
>
> Why? Because you say so? Is that not a tad pedantic?
> That is the way my mailreader does it.
> My post was not a long one and is not difficult to comprehend.

It may be a tad pedantic.

But top posting was never used in email in the old days.

And it is still not used in news postings.

Try read a dozen of other threads here.

You may not agree with it, but sometimes it makes sense to howl with
the wolves your are with ...

Arne
Adam Lipscombe - 15 Oct 2007 10:44 GMT
Nice response.... Fair enough :-)

>>  >Please refrain from top-posting
>>
[quoted text clipped - 14 lines]
>
> Arne
longingforfriday@hotmail.com - 24 Oct 2007 17:39 GMT
> Anyway, I have found a way round it - adding thesessionID to encoded URLs that are to be opned in
> a nww window.

  Please,Please tell me how you coded the bit with the 'encoded URL'.
This problem has cost me a lot of time and headaches which would have
been better spent on adding functions to my application. I would be
very gratefull for any information on this subject!

Longingforfriday


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.