Commits

Anonymous committed 5185513

more better javadocs, yo

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@648573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (2)

src/java/com/opensymphony/webwork/dispatcher/StreamResult.java

  *
  * <ul>
  * <li>contentType - the stream mime-type as sent to the web browser</li>
- * <li>contentDispostion - (optional) the content disposition header value (for sending files)</li>
+ * <li>contentDispostion - the content disposition header value for specifing the file name. (default = "inline", values are typically <i>filename="document.pdf"</i></li>
  * <li>inputName - the name of the InputStream property from the chained action (default = "inputStream")</li>
  * <li>bufferSize - the size of the buffer to copy from input to output (defaul = 1024)</li>
  * </ul>
  */
 public class StreamResult extends WebWorkResultSupport {
     protected String contentType = "text/plain";
-    protected String contentDisposition;
+    protected String contentDisposition = "inline";
     protected String inputName = "inputStream";
     protected int bufferSize = 1024;
 
     }
 
     /**
-     * @return Returns the Content-Disposition header value.
+     * @return Returns the Content-disposition header value.
      */
     public String getContentDisposition() {
         return contentDisposition;
     }
 
     /**
-     * @param contentDisposition the Content-Disposition header value to use.
+     * @param contentDisposition the Content-disposition header value to use.
      */
     public void setContentDisposition(String contentDisposition) {
         this.contentDisposition = contentDisposition;
 
         // Set the content-disposition
         if (contentDisposition != null) {
-            oResponse.addHeader("Content-Disposition", conditionalParse(contentDisposition, invocation));
+            oResponse.addHeader("Content-disposition", conditionalParse(contentDisposition, invocation));
         }
 
         // Get the outputstream

src/java/com/opensymphony/webwork/views/jasperreports/JasperReportsResult.java

  * <ul>
  * <li>format - the format in which the report should be generated. Valid values can be found
  * in {@link JasperReportConstants}. If no format is specified, PDF will be used.</li>
- * <li>contentDisposition : disposition (no default, value is typically <i>filename="document.pdf"</i>)</li>
+ * <li>contentDisposition : disposition (defaults to "inline", values are typically <i>filename="document.pdf"</i>)</li>
  * <li>documentName : name of the document (will generate the http header Content-disposition = X; filename=X.[format])</li>
  * </ul>
  * <p/>