This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 753

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 ]
subject: displaying image + JSP
Similar Threads
Take the quiz: Which sci-fi crew would you fit best in?
JSP Help Regarding the Radio Button
logic:forward problem
Scrollbar for table using div doesnt work in IE
Make rows not appear when certain row value appears