The Answer to Life, the Universe, and Everything

Showing posts with label struts2. Show all posts
Showing posts with label struts2. Show all posts

Wednesday, January 21, 2009

Struts2: <img src="${url}"/>

In case of specifying the url for the image in struts2, you can write as follows.


<s:iterator value="books" status="rowstatus">
<s:url id="url" value="%{bookImagePath[#rowstatus.index]}"/>
<img src="${url}" alt="Book image" align="top"/>
</iterator>