• 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

uploading a word doc/excel files

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a application which has an requirement like uploading a word/excel document into a database table from a jsp view using hibernate or JDBC API .(Like the user browses the file to upload and clicks on a upload button).Can anyone help me with some suggestion and tips on the ways to upload /download documents to a table.


Thanks in advance..
[ December 04, 2008: Message edited by: Bala'J'i Rags ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you have so far? Is the problem the uploading of the file to the servlet container, or the saving of the uploaded file to the database?
 
Bala'J'i Rags
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It focuses on saving the file in an oracle table..Sorry if the post was ambiguios
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use an attribute of type BLOB to store binary data in a database. JDBC supports this through the setBlob and setBinaryStream methods in PreparedStatement, and the getBinaryStream in ResultSet.

I generally advise against storing files in a database. I'd store them somewhere in the file system, and just keep the filename and directory information in the database.
 
Water! People swim in water! Even tiny ads swim in water:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic