Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 68831 invoked from network); 13 Feb 2003 07:38:37 -0000 Received: from unknown (HELO aa-www31.hkairport.com) (168.106.2.31) by daedalus.apache.org with SMTP; 13 Feb 2003 07:38:37 -0000 Received: from aaexims1.HKAIRPORT.COM (aaexims1.hkairport.com [168.106.3.3]) by aa-www31.hkairport.com (8.11.6/8.11.6) with ESMTP id h1D7an013292 for ; Thu, 13 Feb 2003 15:36:49 +0800 (HKT) Received: from AAES99.HKAIRPORT.COM ([168.106.18.105]) by aaexims1.HKAIRPORT.COM with Microsoft SMTPSVC(5.0.2195.2966); Thu, 13 Feb 2003 15:38:39 +0800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: normal Priority: normal Content-Class: urn:content-classes:message Subject: RE: [FileUpload] Problem when upload gif file MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Thu, 13 Feb 2003 15:38:38 +0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [FileUpload] Problem when upload gif file thread-index: AcLSXG2/L2EDRGrvQCuGQceldhHVvQA1Vgxg From: "K K Fung \(ASL\)" To: "Jakarta Commons Users List" X-OriginalArrivalTime: 13 Feb 2003 07:38:39.0765 (UTC) FILETIME=[ECFD6450:01C2D332] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, This time I wrote a servlet to do the upload file job but when it run to = this line List items =3D upload.parseRequest(req); An exception throw: org.apache.commons.fileupload.FileUploadException: Processing of = multipart/form-data request failed. Stream ended unexpectedly at = org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:519= ) at = org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:355= ) at uploadFile.processRequest(uploadFile.java:49) at uploadFile.doPost(uploadFile.java:110) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at = com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMana= ger.java:827) at = com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifec= ycleServlet.java:159) at = com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSer= vlet.java:286) at = com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecy= cleServlet.java:106) at = com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java= :472) at = com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servlet= Manager.java:1012) at = com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMa= nager.java:913) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatc= h(WebAppRequestDispatcher.java:499) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequ= estDispatcher.java:278) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppReque= stDispatcher.java:105) at = com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)= at = com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvok= er.java:123) at = com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cache= dInvocation.java:67) at = com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cache= ableInvocationContext.java:106) at = com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletR= equestProcessor.java:125) at = com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListe= ner.java:315) at = com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection= .java:60) at = com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:3= 13) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) It doesn't matter you upload any file or not, still throw the above = exception. I run this servlet under Websphere Enterprise 4.0 and JRUN = Server 3.0 SP 2. JRUN run this program without problem. Regards, K.K. -----Original Message----- From: Martin Cooper [mailto:martinc@apache.org] Sent: Wednesday, 12 February, 2003 1:40 PM To: commons-user@jakarta.apache.org Subject: Re: [FileUpload] Problem when upload gif file It seems that you are trying to parse the multipart request from = within a JSP page. This is definitely not recommended, and is untested. You = should do that from within a servlet. Nevertheless, if you are having a problem with *one specific GIF = file*, and can successfully upload other GIF files, and binary files in general, please create a bug report, as described here: http://jakarta.apache.org/site/bugs.html and attach the GIF file that is failing. -- Martin Cooper "K K Fung (ASL)" wrote in message news:DEB75D05E94DA04F9C3A01A0CF4347DA042902@AAES99.HKAIRPORT.COM... Hi, I am trying to upload a gif file but got the following error. Beside = that, upload text file is okay. org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly at = org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:519= ) at = org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:355= ) at uploadfile_jsp_14._jspService(uploadfile_jsp_14.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at = org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet= . ja va:286) at = org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at = com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMana= g er .java:827) at = com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifec= y cl eServlet.java:159) at = com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSer= v le t.java:286) at = com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecy= c le Servlet.java:106) at = com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java= : 47 2) at = com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servlet= M an ager.java:1012) at = com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMa= n ag er.java:913) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatc= h (W ebAppRequestDispatcher.java:499) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequ= e st Dispatcher.java:278) at = com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppReque= s tD ispatcher.java:105) at = com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)= at = com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvok= e r. java:123) at = com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cache= d In vocation.java:67) at = com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletR= e qu estProcessor.java:122) at = com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListe= n er .java:315) at = com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection= . ja va:60) at = com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:3= 1 3) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) Regards, K.K. Confidentiality: This e-mail and any attachments are confidential and may also be privileged. If you are not the intended recipient, you must not distribute this message or disclose its contents to any one, use it = for any purpose, store, copy or reproduce in whole or in part in any = manner or form or in any medium, or take any action based on the contents hereof. In such case, please inform the sender by return e-mail and delete this message immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org Confidentiality: This e-mail and any attachments are confidential and may also be privileged. If you are not the intended recipient, you must not distribute this message or disclose its contents to any one, use it = for any purpose, store, copy or reproduce in whole or in part in any = manner or form or in any medium, or take any action based on the contents hereof. In such case, please inform the sender by return e-mail and delete this message immediately. =09 Confidentiality: This e-mail and any attachments are confidential and may also be privileged. If you are not the intended recipient, you must not distribute this message or disclose its contents to any one, use it for any purpose, store, copy or reproduce in whole or in part in any manner or form or in any medium, or take any action based on the contents hereof. In such case, please inform the sender by return e-mail and delete this message immediately.