This page last changed on Dec 14, 2004 by plightbo.

Stream

A custom Result type for send raw data (via an InputStream) directly to the HttpServletResponse. Very useful for allowing users to download content.

Parameters Required Default Description
inputName no inputStream The name of the attribute in the action that is the InputStream (such as getInputStream())
contentType no text/plain The content type of the stream being returned
contentDisposition no inline The Content-disposition attribute in the response header. A typical value is filename="doc.pdf"
bufferSize no 1024 the size, in bytes, of the buffer

Example:

<result name="success" type="stream">
    <param name="inputName">inputStream</param>
    <param name="contentType">${contentType}</param>
    <param name="contentDisposition">filename="${filename}"</param>
    <param name="bufferSize">2024</param>
</result>

Document generated by Confluence on Dec 14, 2004 16:36