This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to read the multipart form-data file content in servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to read the multipart form-data file content in servlet?" Watch "how to read the multipart form-data file content in servlet?" New topic
Author

how to read the multipart form-data file content in servlet?

K Vidhyakar
Ranch Hand

Joined: Jul 10, 2005
Posts: 68
HI,

Is there any way to read the multipart form-data file content in servlet?
I have seen oreilly servlet api but that will save the file in the server. But i want to read the uploaded filecontent without saving.
Can you suggest me the better way to handle this?

Thanks

Vidhyakar
Mark Wa
Ranch Hand

Joined: May 29, 2009
Posts: 122
apache commons file upload api?
K Vidhyakar
Ranch Hand

Joined: Jul 10, 2005
Posts: 68
using apachi common file upload, we can read the file content without saving the file?
I am going through the api now.
Mark Wa
Ranch Hand

Joined: May 29, 2009
Posts: 122
My guess is your better off saving it to a temp directory and reading it from there, rather than holiding it all in memory. Depends on the size of the file I assume.
 
 
subject: how to read the multipart form-data file content in servlet?
 
Similar Threads
How to read a input type file in servlet and display the contents of a file in servlet
File Upload First step
Struts FileUpload - Multipart data doesn't start with boundary
BufferedWriter for Mulitple file type
Servlets, HTML forms, multipart/form-data