SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 18th, 2001, 03:52 AM
Maarten Maarten is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 10 Maarten User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

I have made a servlet. If a remote user activates
the servlet from a web browser, then decides to click the Stop button on the web browser before processing has finished, the transfer is interrupted to the user's web browser, but the servlet continues to run until it has finished.

Is there a way to pass the message that the transfer has been interrupted by the user to the servlet and get it to stop processing immediately?

Thanks for any info,
Maarten
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #2  
Old April 30th, 2001, 11:29 AM
bdturner bdturner is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: the big smoke - London !
Posts: 0 bdturner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I believe that when the browser has stopped listening for the HTTP responce (e.g. either through the stop button, browser shutdown or the obviosu one - browser crashing !) then whenever you try and write any data to the response PrintWriter then you get an IOException error (becasue the end of the pipe is closed).

(Now the techie disclaimer !)
I've Never tried this - but I recall reading it in the O'Reilly Servlet "kettle" book (incase you have a copy handy) and a friend has adivsed me to do the same thing once (never did - found it didn''t matter much in my project before I tried it)
Comments on this post
JimmyGosling agrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Servlet stopping while running


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway