You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/04/22 11:55:01 UTC
getting an image url from a bean property using html:img: impossible?
Subject: getting an image url from a bean property using html:img: impossible?
From: Torgeir Veimo <to...@vertech.no>
===
I try to put an image into a page, with the image url specified as a
String property on a bean.
This seems impossible to do with the <html:img> tag. It will only load
urls directly, or specified in a message resource, it seems. Anyone got
an idea?
I also tried specifying a map as the returned property, putting the url
into the map, and using this code;
<html:img name="mediaForm" property="mediaUrl" pageKey="page"/>
and using this bean form code;
public Map getMediaUrl() {
Map map = new HashMap();
map.put("page", ("/pages" + resource.getPath()));
return map;
}
--
-Torgeir
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>