hi, i'm using oreilly's multipart class for my file uploads. it is working well on my pc.. but when i tried my upload module on our production site an "Unexpected end of part" exception appears when the size of the file im uploading exceeds 100KB... pls help.
Jason's multipart class has two different constructors, one that takes a size limit and one that doesn't. The default size limit is something like 100K or a Meg (I don't remember which). Is it possible you're using the constructor that doesn't take the size limit? Otherwise, sounds like it might be a browser problem. Which browser version are you using? Kyle ------------------ Kyle Brown, Author of Enterprise Java (tm) Programming with IBM Websphere See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
Dear christine, I am also trying to upload a file to server but i get null value from the html page when i try to retrive the file name using getParameterValues("ss"). Would you tell me how you have retrived the file name . thanx prabhakar.
thanx deep, getFileNames(); worked out, But now when i use req.getParameter("string") before MultipartRequest i get the null values, and in my program, i need one parameter to be retrived before multipartRequest. req u to plz help me thanx prabhakar.
you can retrieve the parameter from the multipart request object. If you 'need' the parameter before the file itself, for example, the parameter shows where to upload the file to, what you should do is upload to a temporary directory and retrieve the file path later, and then use the File i/o classes to move that file. This is the recommended behaviour if you read the cos faq.