Hi buddies, I have been trying to write a servlet which will upload a file to the server. For that i used oreilly's MultiPartRequest class, but i get the following exception: "java.io.IOException: Corrupt form data: no leading boundary at com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java, Compiled Code) at java.lang.Exception.(Exception.java, Compiled Code) at java.io.IOException.(IOException.java, Compiled Code) at com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java, Compiled Code) at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:140) at Anirban.Wizard.WizardUpload.processRequest(WizardUpload.java:55) at Anirban.Wizard.WizardUpload.doPost(WizardUpload.java:95) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at com.livesoftware.jrun.JRun.runServlet(JRun.java, Compiled Code) at com.livesoftware.jrun.JRunGeneric.handleConnection(JRunGeneric.java, Compiled Code) at com.livesoftware.jrun.JRunGeneric.handleProxyConnection(JRunGeneric.java, Compiled Code) at com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleRequest(JRunProxyServiceHandler.java, Compiled Code) at com.livesoftware.jrun.service.ThreadConfigHandler.run(ThreadConfigHandler.java, Compiled Code) " any ideas/help shall be appreciated. Thanks ani
henley
Greenhorn
Joined: Jul 06, 2000
Posts: 16
posted
0
Are you sure that the form has the "multipart/form-data" enctype?
Sharon Adar
Greenhorn
Joined: Apr 29, 2007
Posts: 18
posted
0
Hi anirban, Can you tell me where I can get hold of the orielly java class library for use with servlets. I urgently need to code a servlet to upload files. Thanks Sharon
I got the same exception when using AppletFile as a client side tool at HTML, but when using the input of type file no error occured do you face the problem when using input of type file ? On other hand any body can tell me why the request contains AppletFile generates such exception when trying to make an object of type MultipartRequest l_MultipartRequest = new MultipartRequest(p_Request, l_flTempFloder.getCanonicalPath(), p_nMaximumfileSize); ??
Salman Yasser
Greenhorn
Joined: Aug 22, 2002
Posts: 25
posted
0
I got the same exception when using AppletFile as a client side tool at HTML, but when using the input of type file no error occured do you face the problem when using input of type file ? On other hand any body can tell me why the request contains AppletFile generates such exception when trying to make an object of type MultipartRequest l_MultipartRequest = new MultipartRequest(p_Request, l_flTempFloder.getCanonicalPath(), p_nMaximumfileSize); ??
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
posted
0
Every one who has posted in this thread. Welcome to the JavaRanch! Please adjust your display name to meet the JavaRanch Naming Policy. You can change it here. Thanks! and welcome to the JavaRanch!
Salman Yasser
Greenhorn
Joined: Aug 22, 2002
Posts: 25
posted
0
How could I print the Boundary ? from the request or what ?