How to display a Blob object retreived from database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to display a Blob object retreived from database

Patrick Yip
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
 
Reply | Threaded
Open this post in threaded view
|

RE: How to display a Blob object retreived from database

richard.hensley
Patrick,

You need to create a service that can output the image. Check out the chart
service in Workbench.

-----Original Message-----
From: Patrick Yip [mailto:[hidden email]]
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to display a Blob object retreived from database

Patrick Casey
In reply to this post by Patrick Yip

        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:[hidden email]]
> 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: [hidden email]
For additional commands, e-mail: [hidden email]