Tapestry 4 Dynamic image asset
I have images stored in a database I need to serve within a tapestry page.
I was about to write a servlet (simple enough) to serve the image like I always have but I figured using an asset or a service was more tapestry oriented.
What would be the simplest/tidiest way to include a dynamic image within a tapestry page?
Bare in mind I am pulling a byte array out of the database based on a unique i开发者_开发问答dentifier set by the page and that I need to set the content type on the response header.
Advice appreciated, p.
To serve dynamic content, you can implement an IEngineService
, configure it as a service, and then point your download links towards that service.
This page on the Tapestry wiki should help you get started.
精彩评论