Dashboard > WebWork > ... > Result Types > Stream Result
  WebWork Log In View a printable version of the current page.  
  Stream Result
Added by Patrick Lightbody, last edited by Don Brown on Dec 21, 2005  (view change)
Labels: 
(None)

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

Parameters

  • contentType - the stream mime-type as sent to the web browser (default = text/plain).
  • contentLength - the stream length in bytes (the browser displays a progress bar).
  • contentDispostion - the content disposition header value for specifing the file name (default = inline, values are typically filename="document.pdf".
  • inputName - the name of the InputStream property from the chained action (default = inputStream).
  • bufferSize - the size of the buffer to copy from input to output (default = 1024).

Examples

<result name="success" type="stream">
  <param name="contentType">image/jpeg</param>
  <param name="inputName">imageStream</param>
  <param name="contentDisposition">filename="document.pdf"</param>
  <param name="bufferSize">1024</param>
</result>

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators