Re: how to detect when the user presses the stop button

2002-07-29 Thread Tony Baity


On an associated topic...
When someone clicks the browser stop button and the session eventually times out, I 
have in the past implemented HttpSessionBindingListener on a special class used just 
for cleaning up the database/ejbs and attached an instance to the session in an 
overridden ActionServlet when a new session is detected.
Is there another way of doing this... Or something that I have overlooked in Struts.
 "Craig R. McClanahan" wrote:

On Mon, 29 Jul 2002, Eddie Bush wrote:

> Date: Mon, 29 Jul 2002 14:10:45 -0500
> From: Eddie Bush 
> Reply-To: Struts Users Mailing List 
> To: Struts Users Mailing List 
> Subject: Re: how to detect when the user presses the stop button
>
> Yes, it has been answered. The answer is that, assuming the page they
> are waiting to load is printing things out, you will get an IOException
> when you try to send output. AFAIK, this is the only way to detect it.
>

About the best you can hope for is that you *may* get an IOException --
there are no guarantees. Two cases where you definitely won't:

* When the response content is small enough to fit into the
response buffer, and you didn't flush it before returning
from the servlet's doGet() or doPost() method -- the container
might encounter a problem when it flushes, but it's too late
for your application to hear about it.

* When your client is conencted to you via a proxy server (or
something like the Apache-Tomcat web connector), where there
is an intermediary involved -- unless the intermediary is designed
to forward a disconnect notification in some manner that your
servlet container understands (and, for HTTP proxies, there's basically
nothing like this).

This is one of the issues that makes programming web apps quite
interesting ...

Craig


> Andrew Geery wrote:
>
> >I was looking through the struts archive and I've seen this question asked
> >but never answered.
> >
> >See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
> >for the original question.
> >
> >--
> >To unsubscribe, e-mail: 
> >For additional commands, e-mail: 
> >
>
>
>
> --
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do You Yahoo!?
Yahoo! Health - Feel better, live better


Re: how to detect when the user presses the stop button

2002-07-29 Thread Craig R. McClanahan



On Mon, 29 Jul 2002, Eddie Bush wrote:

> Date: Mon, 29 Jul 2002 14:10:45 -0500
> From: Eddie Bush <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: how to detect when the user presses the stop button
>
> Yes, it has been answered.  The answer is that, assuming the page they
> are waiting to load is printing things out, you will get an IOException
> when you try to send output.  AFAIK, this is the only way to detect it.
>

About the best you can hope for is that you *may* get an IOException --
there are no guarantees.  Two cases where you definitely won't:

* When the response content is small enough to fit into the
  response buffer, and you didn't flush it before returning
  from the servlet's doGet() or doPost() method -- the container
  might encounter a problem when it flushes, but it's too late
  for your application to hear about it.

* When your client is conencted to you via a proxy server (or
  something like the Apache-Tomcat web connector), where there
  is an intermediary involved -- unless the intermediary is designed
  to forward a disconnect notification in some manner that your
  servlet container understands (and, for HTTP proxies, there's basically
  nothing like this).

This is one of the issues that makes programming web apps quite
interesting ...

Craig


> Andrew Geery wrote:
>
> >I was looking through the struts archive and I've seen this question asked
> >but never answered.
> >
> >See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
> >for the original question.
> >
> >--
> >To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: how to detect when the user presses the stop button

2002-07-29 Thread Dan Petrie

Look on jGuru.com

You will find the answer there.

-Dan-

-Original Message-
From: Andrew Geery [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 3:18 PM
To: 'Struts Users Mailing List'
Subject: RE: how to detect when the user presses the stop button


I saw that answer, but I was wondering if struts generated an event or
action that corresponded with it. But I guess the answer is that the
framework doesn't give any help here :(.

Thanks for your help.
Andrew

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 3:11 PM
To: Struts Users Mailing List
Subject: Re: how to detect when the user presses the stop button


Yes, it has been answered.  The answer is that, assuming the page they 
are waiting to load is printing things out, you will get an IOException 
when you try to send output.  AFAIK, this is the only way to detect it.

Andrew Geery wrote:

>I was looking through the struts archive and I've seen this question asked
>but never answered.
>
>See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
>for the original question.
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


**
Note: By opening this email and/or any attachments 
contained within this file, you assume sole responsibility for 
any alteration of data that may occur as a consequence of 
any data transfer or copying process.

The information contained in this message may be 
privileged and confidential and protected from disclosure.
If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received
this communication in error, please notify us immediately by
replying to the message and deleting it from your computer.

For more information on Harbor Fund's privacy policy please
visit http://www.harborfund.com/privacy.htm

Thank you.

Harbor Capital Advisors, Inc. One SeaGate. Toledo, OH-43666. 
Tel: 419-247-1940  
Email: [EMAIL PROTECTED]
**


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: how to detect when the user presses the stop button

2002-07-29 Thread Andrew Geery

I saw that answer, but I was wondering if struts generated an event or
action that corresponded with it. But I guess the answer is that the
framework doesn't give any help here :(.

Thanks for your help.
Andrew

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 3:11 PM
To: Struts Users Mailing List
Subject: Re: how to detect when the user presses the stop button


Yes, it has been answered.  The answer is that, assuming the page they 
are waiting to load is printing things out, you will get an IOException 
when you try to send output.  AFAIK, this is the only way to detect it.

Andrew Geery wrote:

>I was looking through the struts archive and I've seen this question asked
>but never answered.
>
>See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
>for the original question.
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: how to detect when the user presses the stop button

2002-07-29 Thread Tony Baity


This is a browser client and JavaScript question unless you are using an applet with 
an open connection to your server. You may want to redirect the question to the 
Mozilla org. The browser folks have not built in detection of those window component 
events on an individual basis except for general onClose purposes. There might be some 
tricks you can do with the mouse x and y to determine if the click was out of the 
regular screen area but this is cowboy hack and may not work for both IE and Netscape.
 Andrew Geery wrote:I was looking through the struts archive and I've seen this 
question asked
but never answered.

See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
for the original question.

--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do You Yahoo!?
Yahoo! Health - Feel better, live better


Re: how to detect when the user presses the stop button

2002-07-29 Thread Eddie Bush

Yes, it has been answered.  The answer is that, assuming the page they 
are waiting to load is printing things out, you will get an IOException 
when you try to send output.  AFAIK, this is the only way to detect it.

Andrew Geery wrote:

>I was looking through the struts archive and I've seen this question asked
>but never answered.
>
>See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063
>for the original question.
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: