Your ImageAction could stream the result in the appropriate format itself.

When done, return null instead of an ActionForward to indicate to struts
that the Action has already handled writing the response.

Not sure what headers etc... need to be set though. If you search the
archive you can probably find some examples.

hth
Andrew

-----Original Message-----
From: Turner Benjamin [mailto:[EMAIL PROTECTED]
Sent: Thursday, 12 February 2004 19:31
To: Struts-User (E-mail)
Subject: struts actions and content/type responses


hello,

i am looking for a solution for the following problem:

in my database i have various BLOB items which represent images (gif or
jpg). i would like to create a struts action which returns this (by passing
along a request parameter to the action which is the imageid in the
database. is it possible to set the response content/type in an action and
then return the image itself somehow? maybe with a requestdispatcher? any
ideas/pointers to this would be welcome.

ty,

Ben

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



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

Reply via email to