• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to Transfer file from client browser to server?  RSS feed

 
mylifeisjava javaislife
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did lot of research and found that using input type=file in jsp i could serach for the file on the client system.I could not make out what do I write on the server side(i.e. in my java class).
Please help me with some code or any links.Thanks for your help.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
a quick look at the W3C HTML specs would have shortened your research. <input type="file" /> is a part of standard html. The browser POST the file Mime64 encoded. You have to write your own handler for that. However if you are clever/lazy, then you buy the "Java Servlet Programming" from OReilly ( http://www.servlets.com/jservlet2/index.html ). It comes with ready baked classes that handle the server side of file upload. See the class descripton here: http://www.servlets.com/cos/index.html
Hth
:-) stw
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!