This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

problem with download prompt cancel button  RSS feed

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,

I am developing an application when user clicks on a button by selecting a file it shows the download prompt with Open/Save/Cancel, Open and Save are working fine. But when clicked on cancel button there is an error being raised on the server with network exception SocketException is being throwed.

How to handle this issue. Can anyone help me in this regard.
 
Ranch Hand
Posts: 281
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like maybe you are not properly closing the connection on the client side when Cancel is clicked.
 
saipraneeth nallapareddy
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i have closed all the connections in the finally block.
 
Michael Angstadt
Ranch Hand
Posts: 281
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you are opening the connection before the user clicks any of the buttons. Maybe you should instead wait for the user to click a button to open the connection. So, if the user clicks Cancel, you can just close the dialog window and the connection will never have been opened, thus preventing that exception from being thrown on the server.
 
Sheriff
Posts: 23640
48
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This cancel button you're describing... is it the one which the browser displays when it decides a response is a file to be downloaded? In that case the error is perfectly normal. It's the same error which occurs when the user interrupts a large page load by clicking on some other link.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!