• 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

File Uploading

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All





I require your assistance in the above matter.





I am trying to upload a file.


I pass this to a servlet.

The problems I experienced:

I can no longer access my normal parameter (i.e. textline) in the form � This is due to enctype attribute set to multipart/form-data . How do I access them now?
How do I filter for pdf �s? I tried using the accept attribute on IE and this does not work. Any Ideas?
How do I upload the file. I tried using the code attached. Where does FileOutputStream fileOut = new FileOutputStream(saveFile); save the file to. How can specify a location.


I am considering using ftp to upload the file. How do I get the attachment into an object like java.io.File ?




Your assistance will be highly appreciated.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please keep the conversation on the same question in the same topic.

thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic