Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to upload a file on webserver using midlet and servlet

 
Mahesh sharma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
i want to upload a video file using midlet to webserver.
can anyone tell me is that possible to do this type of implementation./
thanks
mahesh
 
David Price
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the webserver.
If you control the webserver and you can run e.g. Java servlets on it, then write a MIDlet that sends the file's bytes using an HTTP Connection (HTTP method 'POST'), and a servlet that receives the bytes in its doPost method.
If you don't control the webserver but it has some HTTP Forms interface for uploading files (as does e.g. Geocities), your MIDlet may be able to emulate a web browser and upload a file through the same system. This is tricky; start by reading this stuff on multipart/form-data encoding. You may also have to figure out how to 'log in' to the server first.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic