Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Ketan Dave   on Jun 24 In Java Category.

  
Question Answered By: May Hansen   on Jun 24

in order to display  the image  loaded, you have to store them in a scope larger than request
because
when request  is ended and html page  is builded and sended to browser, browser sends another requests to server for each img  tag in html page.
so you have to :
1) store image in an scope broader than request like session
2) write  some tags  that reads data from them and writes them to jsp  page
there is another solution

when you are making html page just put a refrence of the picture in page in IMG tag  and lazy load pictures at time it is needed to be rendered, for example put entity name, and primary key of picture in picture name, and write a servlet  that using these two fetches pictures from database and displays it.

some modern frameworks like seam have special soloutions for rendering pictures.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Displaying BLOB image in a jsp page through struts. Or get search suggestion and latest updates.


Tagged: