I created a screen called ImageScreen which extends RawScreen. You can set
this up pretty easily to then load a bytearray image from the database and
call it in your velocity template as:

<img src="$!link.setScreen("img.ImageScreen").addPathInfo("imgId",
$img.imgId)"/>

The doOutput method of the ImageScreen is responsible for writing the
byte[] data to the output stream.

If you need code examples let me know. I have it in my CVS somewhere and
can send it to you offlist.

Jeffery Painter

> Hi All,
> I would like to integrate a captcha module to my app.
> How can I send generated image to the client?
>
> Html <img src=""> tag use a link to download image, but my captcha image
> is a
> byte[] array in my context named captcha.
>
> Can I pull it in velocity, or I have to install a separate servlet to
> serve
> captca requests?
>
> --
> thx,
> ----------------------------------------------------
> Zoltan Zidarics programmer
> PTE University Pecs, Hungary
> icq: 43288694


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to