File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Proble displaying images dynamically in jsp

 
Phani Sajja
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new here. I have to display the images dynamically reading from a database. I have no problem displaying images. When i try to reduce the width in img tag then it is slowly rendering it. How to overcome this.

<img src="image.jsp?imgID=112" width="150" heigth="130" border="0">

I am also giving the sample jsp to display

byte [] imgData = blob.getBytes(1,(int)blob.length());
response.setContentType("image/jpeg");
OutputStream o = response.getOutputStream();
o.write(imgData);

I want to display the image without any time taken. How could I solve this. Please Help me.

Thanks.
Phani.
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"javax programmer " Welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This topic is crossposted twice at the Sun forum around the same time.
Please read this: http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic