On Fri, Dec 16, 2005 at 10:02:06AM -0500, Erick Dovale wrote: > Hi Oleg, > thanks for your reply. > How can I do that?? The HttpClient have no method like this nor the > Multipartpost method?? > any hint?? >
PartBase#setTransferEncoding(String) is your friend Oleg > thanks.. > > erick. > Oleg Kalnichevski wrote: > > >On Thu, Dec 15, 2005 at 05:57:10PM -0500, Erick Dovale wrote: > > > > > >>Hello there folks, > >> > >>I am trying to upload a file to a web app. Our servlet seems to be > >>working fine as we can upload files from a browser without problems. > >>When I try to use the httpClient I get the exception pasted below. > >>I have tried both, 2.0.2 and 3.0-rc4 with the former the exception > >>exactly the same except for the first line that ends in 8bit as opposed > >>to binary; which is what i get when 3.0-rc4. > >>I am sorry if this has been asked before in the list. I searched in the > >>archives and could not find anything similar to this. > >> > >>Thanks in advance. > >> > >>erick. > >> > >> > >> > > > >Erick, > > > >Try setting Transfer-Encoding to null. The multipart form processing > >code deployed on the server appears to be have compliance problems with > >the multipart/form-data spec > > > >Oleg > > > > > > > > > >>PD: I am using the sample apps for uploading files. > >> > >>javax.servlet.ServletException: javax.servlet.ServletException: > >>java.io.IOException: Malformed line after content type: > >>Content-Transfer-Encoding: binary > >> > >> at > >>com.jeevesserver.form.DailyActLogUpload.DailyActLogUploadServlet.callGenerate(DailyActLogUploadServlet.java:136) > >> > >> at > >>com.jeevesserver.form.DailyActLogUpload.DailyActLogUploadServlet.doPost(DailyActLogUploadServlet.java:86) > >> > >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) > >> > >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > >> > >> at > >>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) > >> > >> at > >>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) > >> > >> at > >>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > >> > >> at > >>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > >> > >> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > >> > >> at > >>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > >> > >> at > >>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > >> > >> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > >> > >> at > >>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) > >> > >> at > >>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > >> > >> at > >>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > >> > >> at > >>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > >> > >> at > >>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > >> > >> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > >> > >> at > >>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) > >> > >> at > >>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > >> > >> at > >>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > >> > >> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > >> > >> at > >>org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:994) > >> > >> at > >>org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1105) > >> > >> at java.lang.Thread.run(Thread.java:534) > >> > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]