• Post Reply Bookmark Topic Watch Topic
  • New Topic

uploading a file to a servlet  RSS feed

 
Mike Birken
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi--
I obtained a servlet from a book that allows me to upload files from a web browser to a web server; however, I want to write a piece of code that acts as the web browser now. I researched how the HTTP protocol handles file uploads, but my servlet won't accept my browser upload immitation. Anyone know how to do this?
- Mike
 
Bill Siggelkow
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean that you want to write a client-side application that performs the upload this can be done ... however, it is non-trivial if you want to use a servlet that is expecting to process MultiPart data. An easier approach is to write a servlet that simply expects to receive the file data through a stream which the client piece writes to.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!