Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

displaying images from databse  RSS feed

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi guys

i want to dispaly images in jsp that wher already stored in the Databse

if anybody has some sample please post to me .iam struggling to do this

for past 3 days i want to print the image into the browser without storing

the image anywhere(FileSystem). i want to implement this using struts

kindly please help me to do it

advance thanks
regards

amir
[ November 06, 2006: Message edited by: Amirtharaj Chinnaraj ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Do NOT try to use JSP to display images. Images are generally binary data and should be sent from a servlet.

Use your JSP to write an HTML page that contains image links. The browser will fetch the image in a separate request.

I suggest that you start with a static HTML page containing one image link specifying the servlet precoded. Once you have the binary data being served, move on to JSP generation of the page. It is too confusing to try to debug both jsp and image serving at the same time.

Bill
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!