Hi,
I have an entity bean which has a BLOB attribute. That BLOB attribute
maps to a BLOB column in a table in an Oracle database.
@Entity
public class Boo implements Serializable {
...
@Lob
@Basic(fetch=FetchType.LAZY)
private byte[] image;
public byte[] getImage() {
return image;
}
public void setImage(byte[] image) {
this.image = image;
}
...
}
I also have an Action class where i query that entity bean and put the
result into the session :
public class MyAction extends ActionSupport implements SessionAware {
...
Public String someMethod() throws Exception {
Boo boo = blaRemote.findById(l);
session.put("boo ", boo );
...
}
Finally in my JSP i display the various values of the attributes of that
Entity bean, including that image attribute :
<s:property value="#session.boo.attributeN" /> <br />
<img src="<s:property value="#session.boo.image" />" /> <br />
Of course I can display the value of all attributes except the image.
How do you display an image with Struts 2 ? Is there a specific tag for
it ?
Thanks for helping.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]