• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to Transfer file from client browser to server?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic