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 Struts and the fly likes struts tag html:img 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 » Frameworks » Struts
Bookmark "struts tag html:img" Watch "struts tag html:img" New topic

struts tag html:img

swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
<td width="16%"><html:img page="/images/"<bean:write name="products" property="ImgURL"/>"/></td>
In my bean,ImgURL is String,name of a photo,I put photos to a folder /images,but now How to do? It's wrong do like that. help me
thank you !!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You can't embed one Struts tag inside another. Struts just doesn't support that. The easiest way to fix this is to use a regular HTML <img> tag rather than <html:img>. You can embed a <bean:write> tag inside a regular HTML tag.

Consultant, Sima Solutions
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
thank you !!! but another question appers
my list.jsp contain listcontent.jsp
listcontent.jsp can display the photo,but list.jsp can't display
why??? can you help me??
swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
my question has solved .
thank you
I agree. Here's the link:
subject: struts tag html:img
Similar Threads
quote symbol expected problem
Param passing in link, prepopulation and javascript
html:link and form
html:img NullPointerException
images not display on Struts forwarding JSP page