You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Yip <yi...@ICG.com> on 2005/05/19 23:44:55 UTC
How to display a Blob object retreived from database
I can display images correctly using IAsset such as this
Html:
<img jwcid="@Image" alt="ognl:manufacturerName"
image="ognl:logoLinkAsset" border="1"/>
class:
public IAsset getLogoLinkAsset(){
...
logoLink = "/images/sony.gif" ;
return (IAsset) new ExternalAsset(logoLink,null);
}
Question, if have a Blob object retrieved from a database, how do I
display the image now?
Any suggestion is greatly appreciated.
Patrick
RE: How to display a Blob object retreived from database
Posted by Patrick Casey <pa...@adelphia.net>.
You'll need to create a special servlet to serve the blobs. Then
embed a link to that servlet into the HTTP e.g.
<img src="/myhost/myaPP/imageServlet?imagename=foo" />
There's no way to "inline" binary data into an HTTP page.
--- Pat
> -----Original Message-----
> From: Patrick Yip [mailto:yipp@ICG.com]
> Sent: Thursday, May 19, 2005 2:45 PM
> To: Tapestry users
> Subject: How to display a Blob object retreived from database
>
> I can display images correctly using IAsset such as this
>
> Html:
> <img jwcid="@Image" alt="ognl:manufacturerName"
> image="ognl:logoLinkAsset" border="1"/>
>
>
> class:
>
> public IAsset getLogoLinkAsset(){
> ...
> logoLink = "/images/sony.gif" ;
>
> return (IAsset) new ExternalAsset(logoLink,null);
>
> }
>
>
> Question, if have a Blob object retrieved from a database, how do I
> display the image now?
>
> Any suggestion is greatly appreciated.
> Patrick
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org