| Author |
error during uploading files - no parametres in request
|
max afinogenov
Greenhorn
Joined: Jun 10, 2007
Posts: 9
|
|
Hi guys. I have a simple html page with 2 text fields and 1 file field. This is my simple servlet: After sending request, this servlet shows, that it hasn't received any param. Answer page is <html> </html> But if I use /*ServletInputStream in = request.getInputStream(); int i = in.read(); while (i!=-1) { pw.print((char)i); i=in.read(); } pw.close();*/ then i see all the HTTP request (in the answer page). I have also tried to get params using request.getParameter("..."), but the result was the same. When i dont use tag enctype="multipart/form-data", all is ok (of course, no file was uploaded). Browser is mozilla. Applications .war file is deployed using weblogic (because its a test of interface of greater application). Can you help me with this problem, please?
|
 |
Herman Schelti
Ranch Hand
Joined: Jul 17, 2006
Posts: 387
|
|
hi Max, it's true: if you upload a file, you can't use request.getParameter(...) anymore. I suggest you have a look at The Commons FileUpload package (see http://commons.apache.org/fileupload/) Herman
|
 |
 |
|
|
subject: error during uploading files - no parametres in request
|
|
|