File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes binary file upload problem with jakarta Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "binary file upload problem with jakarta" Watch "binary file upload problem with jakarta" New topic

binary file upload problem with jakarta

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I read in the javaranch discussions that you can upload any file of any type but that doesn't work for me.
Upload simple text files works fine , even large ones. I have tried uploading jpg and xls files.
This is the error i get when running in Netscape:
A network error occurred while Netscape was sending data.
(Network Error: Connection aborted)
This is the error I get when running in Internet Explorer: unexpected end of part
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at Code)
at com.oreilly.servlet.multipart.PartInputStream.fill(Compiled de)
at Code)
at Code)
at com.oreilly.servlet.multipart.FilePart.write(Compiled Code)
at com.oreilly.servlet.multipart.FilePart.writeTo(Compiled Code)
at com.oreilly.servlet.MultipartRequest.(Compiled Code)
at Upload2.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ Code)
at Code)
When I run the same servlet on my local machine using the jswdk server it works fine. But the reason could be that it runs on my local machine ...
Can anyone help ??
I'm running my servlet on an Apache/Jakarta unix machine .
We are running the following versions:
- IBM HTTPServer powered by apache
- Java 1.1.8
- TOMCAT Version 3.2.1
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

I just found the solution. It seems there is a bug in the version of Tomcat that I am currently running (3.2.1) that causes this problem. 3.2.2 fixes it and I have tried a workaround for the current release which seems to work also. (using ajp12 instead of
I found the information in
I hope this information is usefull for someone else trying to run servlets, because it is difficult to know in which forums/usergroups to search for problems like this.
I agree. Here's the link:
subject: binary file upload problem with jakarta
It's not a secret anymore!