velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Owens" <j...@payrollnw.com>
Subject Re: Multipart template
Date Wed, 16 Jul 2003 17:48:34 GMT
Ah.  I was thinking in a different direction: Content-type:
multipart/mixed;boundary...  something along the lines of O'Reilly's
com.oreilly.servlet.MultipartResponse.

This will work though - excellent!

Thanks Lev!
-jeff


----- Original Message -----
From: "Lev Epshteyn" <levik@corsis.com>
To: "'Velocity Users List'" <velocity-user@jakarta.apache.org>
Sent: Wednesday, July 16, 2003 10:22 AM
Subject: RE: Multipart template


> You need to generate the image on a separate request.
>
> Inside your template, there should be an <img> tag with a src parameter
> referencing your servlet
> For example: <IMG SRC="http://www.server.com/webapp/servlet?mode=image">
>
> The servlet should then return an image as a binary stream if it sees the
> "mode=image" parameter.
>
> There is no way to output both HTML and an image to the browser on the
same
> request, as HTML doesn't provide a mechanism to "embed" images in the
> document, only to reference them.
>
> -----Original Message-----
> From: Jeff Owens [mailto:jeff@payrollnw.com]
> Sent: Wednesday, July 16, 2003 1:26 PM
> To: Velocity Users List
> Subject: Multipart template
>
>
>
> Does Velocity provide some way of utilizing a multipart content-type
> template?
>
> In other words: I have a servlet generating data for a Velocity template.
> Along with text such as name and address, I want a picture to be embedded
> within the web page.  HOWEVER, the picture is coming as binary data - NOT
a
> <img> link or anything like that.
>
> Limitations:
> 1.  The picture is not stored as a file, it will come from the servlet as
> binary data.
> 2.  The picture must be embedded within a velocity template somehow.
> 3.  The template I need the picture to go in is already a very nice
Velocity
> template - I'm not interested in generating the page html myself or
> switching to some other templating system.  (I would generate just the
> portion of the html for the picture - if I can embed it in the template
> somehow)
>
> Thanks for your help,
> Jeff Owens
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message