This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JSP and the fly likes displaying image + JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "displaying image + JSP" Watch "displaying image + JSP" New topic

displaying image + JSP

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761

i have created one blog, in which when i display perticuler topic, i have written following code to display image...

in the code i'm using img src to display image.. image is getting display perfactly but the problem is that when there is no image i.e in case when the blogger has not uploaded image... it is displaying red cross.

i dont want to display that red cross, (Source/image not found)

How do i do that ???

Jigar Naik

Roberston Guillaume

Joined: Mar 31, 2006
Posts: 3
the red cross mean the image don't exist

the easyer way to avoid that is
When a topic is created : create an image with a "default" value a default icone(ie copy a default image as the topic image)

So If the user don't upload image for this topic it will display the default image

the default image can be a blank(transparent) one if you want no picture
[ April 05, 2007: Message edited by: Roberston Guillaume ]
I agree. Here's the link:
subject: displaying image + JSP
It's not a secret anymore!