Hi all,

I'm trying to use to "stream" result type to get some images to display within a portal.

Based on the wiki page: http://struts.apache.org/2.x/docs/stream-result.html

I did my own action that gets an image and puts it into a model.

This is the struts configuration:

<action name="displayExerciceImageAction" class="displayExerciceAction">
           <result name="success" type="stream">
             <param name="contentType">${model.imageContentType}</param>
             <param name="inputName">${model.image}</param>
<param name="contentDisposition">filename="${model.name}_img"</param>
             <param name="bufferSize">${model.image.length}</param>
           </result>
       </action>

image being an array of bytes.

While getting called, I'm getting the following error:
NoSuchMethodException: setBufferSize(java.lang.String)

My first though was that the image was null, but it's not the case, the size should be 12345.

Any clue ?

Thanks,
- Pascal


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

Reply via email to