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

sample JSP code to upload file into database?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hey all,
please give me the sample JSP source code to upload file as object into database.

thanks,
rahul
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I take it you mean as a binary BLOB field in the db ?
 
rahul saxena
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hi what for FileInputStream object used in the following code???

thanks



Originally posted by Ben Keeping:
I take it you mean as a binary BLOB field in the db ?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Rahul,

The FileInputStream is used to read streams of raw bytes such as image data. It obtains input bytes from a file in a file system.

Sandip
 
Ben Keeping
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Your question is "how to upload file into a database" - so you use the FileInputStream to read the file ! Try out the API docs ...

Also, please do not crosspost threads (Servlet forum and JSP forum).
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This thread is a duplicate of the one here.

Please don't post the same question in multiple forums, it creates duplicate conversations and wastes the time of the people trying to help you. Like we have here.

Personally I think they should both be closed and one copy moved to JDBC, but since I have no control over the other forum this thread is closed.

Dave
 
Did you miss me? Did you miss this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic