[ 
https://issues.apache.org/jira/browse/WW-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135071#comment-14135071
 ] 

Lukasz Lenart commented on WW-4362:
-----------------------------------

I think you should implement your own version of {{MultiPartRequest}} or extend 
one of existing and reimplement {{cleanUp}} method to do what you need. I don't 
have an idea how to solve it in nicer way without creating a dependency between 
{{FileUploadInterceptor}} and {{ExecuteAndWaitInterceptor}}

> ExecAndWait Interceptor with FileUploadInterceptor incompatibility
> ------------------------------------------------------------------
>
>                 Key: WW-4362
>                 URL: https://issues.apache.org/jira/browse/WW-4362
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.16.3
>            Reporter: Cédric Couralet
>              Labels: fileupload
>             Fix For: 2.3.x
>
>         Attachments: test-eawfu.zip
>
>
> When using execAndWait interceptor with FileUpload interceptor, the uploaded 
> file is removed before processing.
> *Steps to reproduce :*
> On a sample project, add a simple action which expects a file and a 
> struts.xml of the form :
> {code:xml}
> <!DOCTYPE struts PUBLIC
>     "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
>     "http://struts.apache.org/dtds/struts-2.3.dtd  ">
> <struts>
>       <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>       <constant name="struts.devMode" value="true" />
>       <constant name="struts.action.extension" value="," />
>       <package name="accueil" namespace="/" extends="struts-default">
>    <action name="">
>          <result name="success">WEB-INF/jsp/accueil.jsp</result>
>       </action>
>               <action name="accueil">
>                       <result name="success">WEB-INF/jsp/accueil.jsp</result>
>               </action>
>               <action name="simple" class="net.micedre.action.SimpleAction">
>          <interceptor-ref name="executeAndWaitStack" />
>      
>                       <result name="error">WEB-INF/jsp/accueil.jsp</result>
>                       <result name="success">WEB-INF/jsp/accueil.jsp</result>
>          <result name="wait">WEB-INF/jsp/wait.jsp</result>
>               </action>
>       </package>
> </struts>
> {code}
> In the case of the attached example, the uploaded file is deleted before any 
> treatment by SimpleAction on it.
> This is caused by the StrutsFilter which cleans up the request leading to a 
> deletion (in the case of jakarta file-upload) before the 
> BackgroundProcessThread created by the execAndWait interceptor runs (or 
> during).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to