Use the html:img tag, I guess your image would be rendered by something like:
<bean:define id="imageparam" value="1234" />
paramId="id" paramName="imageparam" />
The imageparam bean is needed to get the parameter to the image url. If you can make that in some other way that is probably better :-)
Not sure about what you mean when you say that you must display text.