All, I am trying to upload a file via an HTTP <INPUT TYPE="FILE" NAME="file_part"> parameter using Servlets. I have downloaded the O'reilly packages, and gotten them to work ... but I am having trouble writing my own (learn by doing ). I have tried: File f = new File ( request.getParameter ( "file_part" ) ); (which throws a NullPointerException, regardless of whether the field is populated). AND too many hours of fruitless labor. Any suggestions? I can manipulate files fine, but I just can't GET the file Thanks, Ryan Lowe
Hi Ryan, try a BufferedReader to read the lines posted by your form.
You should find the difference between a normal form POST and an "multipart/form-data" POST. Then you may be able to write your own multipart parser. Regards Torsten
Joined: Aug 04, 2003
Thank you Torsten. That provided me with the direction I needed Also, Malhar ... Most of the references on JavaRanch point to the oreilly packages or other libraries, not instructions on how to do it *manually*. Thanks Again, R