NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: question

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
michael
Posted via mailing list.





PostPosted: Tue Aug 24, 2010 1:29 pm    Post subject: Re: question Reply with quote

I'm not sure this i s supported in HTML/JSP - windows are closed on the client machine and the event is not propagated to the server.
You could try to:
1. add an "I'm closing" GET request via javascript on the page's unload event (would probably get blocked by popup blockers).
2. Use the watchdog pattern - make an async GET request with the session's id each second. When the server does not get any such requests for, say 10 seconds, you know the window is closed

Both cases would break if the user keeps the window open but disconnects his/hers machine from the net.
Any other ideas?

Michael Bar-Sinai
Software Engineer


________________________________________
From: Dina Salah [address-removed]
Sent: Tuesday, August 24, 2010 1:33 PM
To: address-removed; address-removed
Subject: [nbj2ee] question

Hello Sir,
I would like to calculate the time from when the user opens a jsp page to when he closes
it.

Do you have any Idea?

Thanks in advance,


--
Best Regards,

Dina Salah El-deen Hassan
Software developer
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo