• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem Uploading Files

 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am facing an issue with Servlet Upload. I get below Error when i upload CSV files using Servlet Upload. The strange part about this is that this error is thrown sometimes and sometimes it uploads fine.

Here are the details for this issue ::

Error ::



My Code ::

JSP Page




Servlet Code



 
Sheriff
Posts: 28327
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the user terminates the upload before it is finished, you could get an exception. Or if some other network problem occurs.

You could test this yourself by uploading a large file to that code and not permitting the upload to complete.
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Thanks for your reply. The user does not terminate the upload process, it just hangs itself and when i check the logs, it shows Broken Pipe. I tried uploading a 500kb CSV file but it sometimes uploads fine and sometimes it hangs up and show this error.

 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ujjwal soni wrote:Hi Paul,

Thanks for your reply. The user does not terminate the upload process, it just hangs itself and when i check the logs, it shows Broken Pipe. I tried uploading a 500kb CSV file but it sometimes uploads fine and sometimes it hangs up and show this error.



Do you know the path the call is taking? What firewalls, proxies, routers and other networks components that might want to have a saying in this? What is the request timeout? On slower networks, sometimes you need to raise the connection timeout. On Tomcat the default connectionTimeout is 60.000 milliseconds. For a 500 kB file, you need to have a 66 kbits/s to not timeout. That is not that much.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to give the client side validation by using servlet ?
 
Your mother is a hamster and your father smells of tiny ads!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic