db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Courcoux <pe...@courcoux.biz>
Subject Re: images / Turbine
Date Thu, 15 May 2003 18:54:22 GMT

You can do something like this in your template :

<img width="650"

Then in the doPerform method of MyAction.java 

and something like this :-

// Set up response
HttpServletResponse response = data.getResponse();
ServletOutputStream sos = response.getOutputStream();
String contentType = "image/png";
// use the primarykey to get the image as a stream
// and write it to the ServletOutputStream

For more detail on writing directly to the servlet output stream see the
turbine wiki page titled VelocityOnlyLayout
I hope this helps.

On Thu, 2003-05-15 at 19:30, Pavel Kusch wrote:
> Hello,
> We have images uploaded in database and now we need to get those images from
> the database and put them in HTML code using <IMG SRC="" > tag.  The images
> are stored as BLOB. Can Turbine help with that?
> Thank you.
> Pavel Kusch
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
Peter Courcoux <peter@courcoux.biz>

View raw message