Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upload a file?

 
Hari Haran
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to upload a file in the server.
I have a html page where there is a button .
On clicking which a Filedialog box appears.
When the user selects a file the file should be uploaded into the server.
Can someone help me out with an example in servlets.
 
Paul Wetzel
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a common action to be preformed and the best resource is to download from oreilly (tho book people with animals etc. on the cover) a package called com.oreilly.servlets and in that package is a class called multipart request. When you submit your form creat a MultipartRequest object from the HTTPRequest object and some other parameters. The third book on the header above is the book that contains the code and example. Let me know if you need more info.
good luck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic