• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to store/retrieve Image file through JSP  RSS feed

 
Pramod_Job
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I am making a Auction site.But problem arise is I know how to store a img file through java into database.But I don't know through JSP.
I am using back end as a Oracle.& I am used BLOB datatypes for storing a img file. I want code for storing & retrieving a img file from oracle database & this img file again view to user through html.If anyone have a idea. pls. give response as early as possible.
 
Deyan Sultov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not accomplish this only using jsp..you shold use servlet in order to get stream from your BLOB and direct this stream to HTTPServletResponse.
 
Pramod_Job
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

See if we can do it in Servlet then why not in jsp?
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's just much easier with servlets, since JSPs are geared up to producing textual content rather than binary content.
Simon
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!