Hi All, Displaying image in jsp using struts, My requirement is that I have an URL which will dynamically get it from DB using DAO / VO mechanism. I have to add that URL in image tag, say url1 has the real content url
<html:image property="url1" src="url1" name="contentVO" /> is this correct syntax? pls help me out of image tag. Thanks Cheers jowsaki
Darryl A. J. Staflund
Ranch Hand
Joined: Oct 06, 2002
Posts: 303
posted
0
Hi there, There is a difference between <html:image /> and <html:img />. The former is used to render an image-like submit button. The latter is used to render a graphic image. The latter can be implemented in a number of ways:
or:
or:
Cheers, Darryl
Sham Jowsaki
Ranch Hand
Joined: May 22, 2001
Posts: 146
posted
0
Hi Darryl, Tks for your reply.. But in my case, I have the path of the image is in property field (url1 = http://localhost/xyz.gif) now I need to pass this value in img src="" field. Can you pls advise me. thanks cheers jowsaki
Darryl A. J. Staflund
Ranch Hand
Joined: Oct 06, 2002
Posts: 303
posted
0
Try this
or
Cheers, Darryl
Sham Jowsaki
Ranch Hand
Joined: May 22, 2001
Posts: 146
posted
0
Sorry Darryl, thanks for your response. I solved the stuff by writing the property value as bean:write. Thanks Jowsaki
xavier sundar
Greenhorn
Joined: Jan 09, 2013
Posts: 2
posted
0
Hi,
In case of BLOB image or image from local url(d:/directorypath/filename.jpg).
How to display this.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.