Note that there are some explanatory texts on larger screens.

plurals
  1. POfile download issue in struts 2
    primarykey
    data
    text
    <p>I need image file download functionality in my application. I download the image using Struts 2 stream type. File download successfully but at that time execute action class is two times. How to solve this problem?</p> <pre><code>&lt;action name="download" class="com.ft.bsnl.hb.action.DownloadAction" method="mddownload"&gt; &lt;result name="success" type="stream" &gt; &lt;param name="contentType"&gt;image/jpeg&lt;/param&gt; &lt;param name="inputName"&gt;fileToDownload&lt;/param&gt; &lt;param name="contentDisposition"&gt;contentDisposition&lt;/param&gt; &lt;/result&gt; &lt;result name="failed"&gt;/jsp/DownloadComplete.jsp&lt;/result&gt; &lt;/action&gt; </code></pre> <p>my log is </p> <pre><code>Inner of Download Process..... Return Status : success 2013-10-23 15:19:55.927 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@4e836869, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=inputName] 2013-10-23 15:19:55.929 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:55.929 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:55.931 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:55.932 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:55.933 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:55.934 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@4e836869, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=contentLength] 2013-10-23 15:19:55.935 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:55.936 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:55.937 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:55.938 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:55.939 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:55.940 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@4e836869, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=bufferSize] 2013-10-23 15:19:55.941 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:55.942 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:55.943 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:55.944 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:55.945 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:55.947 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@4e836869, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=contentCharSet] 2013-10-23 15:19:55.947 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:55.948 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:55.948 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:55.949 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:55.949 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:55.951 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming result [fileToDownload] type=[image/jpg] length=[null] content-disposition=[attachment;filename=FW000001.jpg] charset=[null] 2013-10-23 15:19:55.951 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming to output buffer +++ START +++ 2013-10-23 15:19:55.952 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming to output buffer +++ END +++ 2013-10-23 15:19:55.953 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - after Locale=en_GB 2013-10-23 15:19:55.953 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - intercept } 2013-10-23 15:19:56.404 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=struts] 2013-10-23 15:19:56.405 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=struts] 2013-10-23 15:19:56.406 [DEBUG] com.opensymphony.xwork2.config.ConfigurationManager:57 - Checking ConfigurationProviders for reload. 2013-10-23 15:19:56.407 [DEBUG] com.opensymphony.xwork2.DefaultActionProxy:57 - Creating an DefaultActionProxy for namespace / and action name download 2013-10-23 15:19:56.408 [DEBUG] org.springframework.beans.factory.support.DefaultListableBeanFactory:245 - Returning cached instance of singleton bean 'servletContext' 2013-10-23 15:19:56.409 [DEBUG] org.springframework.beans.factory.support.DefaultListableBeanFactory:1140 - Added autowiring by name from bean name 'com.tt.test.action.DownloadAction' via property 'servletContext' to bean named 'servletContext' 2013-10-23 15:19:56.410 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - intercept '//download' { 2013-10-23 15:19:56.410 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - applied invocation context locale=en_US 2013-10-23 15:19:56.411 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - before Locale=en_US 2013-10-23 15:19:56.412 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@3012db7c, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=struts] 2013-10-23 15:19:56.412 [DEBUG] org.apache.struts2.interceptor.FileUploadInterceptor:57 - Bypassing //download 2013-10-23 15:19:56.413 [DEBUG] com.opensymphony.xwork2.interceptor.StaticParametersInterceptor:57 - Setting static parameters {} 2013-10-23 15:19:56.414 [DEBUG] com.opensymphony.xwork2.interceptor.ParametersInterceptor:57 - Setting params NONE 2013-10-23 15:19:56.414 [DEBUG] com.opensymphony.xwork2.interceptor.ParametersInterceptor:57 - Setting params Req =&gt; [ ps1 ] id =&gt; [ Ps1WP1 ] 2013-10-23 15:19:56.415 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: Req 2013-10-23 15:19:56.416 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.417 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [Req] = none found 2013-10-23 15:19:56.417 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [Req] = none found 2013-10-23 15:19:56.418 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.419 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: id 2013-10-23 15:19:56.419 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.420 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [id] = none found 2013-10-23 15:19:56.421 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [id] = none found 2013-10-23 15:19:56.422 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.423 [DEBUG] org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor:57 - Validating //download with method mddownload. 2013-10-23 15:19:56.474 [DEBUG] com.opensymphony.xwork2.validator.ValidationInterceptor:57 - Invoking validate() on action com.tt.test.action.DownloadAction@3012db7c 2013-10-23 15:19:56.475 [DEBUG] com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:57 - cannot find method [validateMddownload] in action [com.tt.test.action.DownloadAction@3012db7c] 2013-10-23 15:19:56.476 [DEBUG] com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:57 - cannot find method [validateDoMddownload] in action [com.tt.test.action.DownloadAction@3012db7c] 2013-10-23 15:19:56.476 [DEBUG] com.opensymphony.xwork2.DefaultActionInvocation:57 - Executing action method = mddownload Inner of Download Process..... Return Status : success 2013-10-23 15:19:56.553 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@3012db7c, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=inputName] 2013-10-23 15:19:56.554 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:56.554 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.555 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:56.555 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:56.555 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.558 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@3012db7c, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=contentLength] 2013-10-23 15:19:56.560 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:56.561 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.561 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:56.562 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:56.562 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.563 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@3012db7c, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=bufferSize] 2013-10-23 15:19:56.563 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:56.564 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.564 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:56.565 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:56.566 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.567 [DEBUG] com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler:57 - Entering nullPropertyValue [target=[com.tt.test.action.DownloadAction@3012db7c, com.opensymphony.xwork2.DefaultTextProvider@cb78915], property=contentCharSet] 2013-10-23 15:19:56.567 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Property: contentType 2013-10-23 15:19:56.568 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - Class: com.tt.test.action.DownloadAction 2013-10-23 15:19:56.569 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - field-level type converter for property [contentType] = none found 2013-10-23 15:19:56.570 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - global-level type converter for property [contentType] = none found 2013-10-23 15:19:56.570 [DEBUG] com.opensymphony.xwork2.conversion.impl.XWorkConverter:57 - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@256d6cf] 2013-10-23 15:19:56.571 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming result [fileToDownload] type=[image/jpg] length=[null] content-disposition=[attachment;filename=FW000001.jpg] charset=[null] 2013-10-23 15:19:56.572 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming to output buffer +++ START +++ 2013-10-23 15:19:56.573 [DEBUG] org.apache.struts2.dispatcher.StreamResult:57 - Streaming to output buffer +++ END +++ 2013-10-23 15:19:56.574 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - after Locale=en_US 2013-10-23 15:19:56.574 [DEBUG] com.opensymphony.xwork2.interceptor.I18nInterceptor:57 - intercept } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload