This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes Proble displaying images dynamically in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Proble displaying images dynamically in jsp " Watch "Proble displaying images dynamically in jsp " New topic
Author

Proble displaying images dynamically in jsp

Phani Sajja
Greenhorn

Joined: Mar 08, 2009
Posts: 3
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

Joined: Jun 06, 2007
Posts: 2716
    
    6

"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.


SCJP, SCWCD.
|Asking Good Questions|
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
This topic is crossposted twice at the Sun forum around the same time.
Please read this: http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Proble displaying images dynamically in jsp