Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
K Vidhyakar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apache commons file upload api?
 
K Vidhyakar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic