wood burning stoves 2.0*
The moose likes Servlets and the fly likes Problem Uploading Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem Uploading Files" Watch "Problem Uploading Files" New topic
Author

Problem Uploading Files

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
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




Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18656
    
    8

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

Joined: Mar 28, 2007
Posts: 403
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.

Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

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.
Santanu Acharya
Greenhorn

Joined: Oct 10, 2011
Posts: 2
How to give the client side validation by using servlet ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem Uploading Files