Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to store and retrive image through jsp page to oracle?

 
mehta soham
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to Oracle.
I want to save and retrieve image through my jsp page to my oracle database.
Please help me out.
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, this isn't entirely an oracle database only problem, unless there is some funky out of box toys that comes with OAS

from a jsp page, which is really rendered in the browser as html, we would need to start with having a display of a widget to do a file upload, such as let the user choose the image to be uploaded into the server, where somthing like the commons-fileupload on the server would receive and unpack the uploaded image to a stream or a temporary file. or creating a custom widget or applet and having it invoke its own HTTP POST.to a custom image receiver servlet.

once the image is able to be sent to the server side, depending on the database abstraction framework (what is it oracle uses, toplink?) you would need to invoke the request to have the image (stream) saved into the table's blob field. Or, its likely possible if using the new JDBC 1.4 to invoke the new stream methods on the prepared statement, which is an elegant way to move things into blob fields.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic