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: java.io.IOException: unexpected end of part at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.io.IOException.(Compiled Code) at com.oreilly.servlet.multipart.PartInputStream.fill(Compiled de) at com.oreilly.servlet.multipart.PartInputStream.read(Compiled Code) at com.oreilly.servlet.multipart.PartInputStream.read(Compiled 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$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled 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: - AIX 18.104.22.168 - IBM HTTPServer powered by apache - Java 1.1.8 - TOMCAT Version 3.2.1
Joined: Nov 22, 2008
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 ajp13) I found the information in http://w6.metronet.com/~wjm/tomcat/2001/Apr/msg00656.html 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.