Hola,
He creado un servlet para subir ficheros, para ello utilizo el fileupload de java, me pasa que con ficheros pequeños me va bien pero cuando intento subir un fichero de 1Mb o mas me falla, me da el siguiente error:
org.apache.commons.fileupload.FileUploadBase$IOFil eUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
at org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:367)
at org.apache.commons.fileupload.servlet.ServletFileU pload.parseRequest(ServletFileUpload.java:126)
at Ficheros.FicheroManager.doPost(FicheroManager.java :126)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.servlets.InvokerServlet.serveR equest(InvokerServlet.java:419)
at org.apache.catalina.servlets.InvokerServlet.doPost (InvokerServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnectio n.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.commons.fileupload.MultipartStream$Malf ormedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream$Item InputStream.makeAvailable(MultipartStream.java:983 )
at org.apache.commons.fileupload.MultipartStream$Item InputStream.read(MultipartStream.java:887)
at java.io.InputStream.read(InputStream.java:85)
at org.apache.commons.fileupload.util.Streams.copy(St reams.java:94)
at org.apache.commons.fileupload.util.Streams.copy(St reams.java:64)
at org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:362)