You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lund <pi...@hotmail.com> on 2009/02/09 16:21:02 UTC

Struts 2 file upload

Hi 

I'm using Strurs 2.1.2 and the <s:file name="upload" label="File" /> tag in
the jsp page. 
My problem is that while the fileUpload appears to work most of the time I
do get java.io.FileNotFoundException: on the .tmp file that Struts uses as
part of the process (prob 1 in 10 times). Once this happens of course the
whole process breaks down.

I boiled the whole process down to a simple test action and tested it
repeatedly and also checked if anyone else had this issue. It appears that
this issue was fixed as of 2.0.9 release but I am still seeing it.

I'm using commons-fileupload-1.2.1 and commons-io.1.3.2 

Any ideas before I abandon struts 2 fileupload?

Thanks
-- 
View this message in context: http://www.nabble.com/Struts-2-file-upload-tp21915019p21915019.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 2 file upload

Posted by Martin Gainty <mg...@hotmail.com>.
Brian reported a bug with that interceptor in 2.1.7
https://issues.apache.org/struts/browse/WW-2985
the fix being 
created my own subclass of ExecuteAndWaitInterceptor and overrode
getNewBackgroundProcess to return my own implementation of BackgroundProcess

should test the same error on 2.1.7 distro

Thanks
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Tue, 10 Feb 2009 07:43:52 -0800
> From: piersp@hotmail.com
> To: user@struts.apache.org
> Subject: Re: Struts 2 file upload
> 
> 
> 
> 
> Lund wrote:
> > 
> > 
> > 
> > newton.dave wrote:
> >> 
> >> Lund wrote:
> >>> I'm using Strurs 2.1.2 and the <s:file name="upload" label="File" /> tag
> >>> in
> >>> the jsp page. 
> >>> My problem is that while the fileUpload appears to work most of the time
> >>> I
> >>> do get java.io.FileNotFoundException: on the .tmp file that Struts uses
> >>> as
> >>> part of the process (prob 1 in 10 times). Once this happens of course
> >>> the
> >>> whole process breaks down.
> >>> 
> >>> I boiled the whole process down to a simple test action and tested it
> >>> repeatedly and also checked if anyone else had this issue. It appears
> >>> that
> >>> this issue was fixed as of 2.0.9 release but I am still seeing it.
> >>> 
> >>> I'm using commons-fileupload-1.2.1 and commons-io.1.3.2 
> >>> 
> >>> Any ideas before I abandon struts 2 fileupload?
> >> 
> >> Does the same thing happened with an actual release version of S2.1?
> >> 
> >> Dave
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >> 
> >> 
> >> 
> > 
> > 
> > 
> > I've switched to release 2.1.6 and changed the multipartrequest processor
> > to the Jason Pell version which has improved things. I'll re-post if I get
> > the same issue again. What I noticed using the Jakarta processor was that
> > the filename of the  *.tmp used would be out of range. I.e jakarta was
> > looking for 5.tmp whereas the file available was 7.tmp
> > 
> > 
> > 
> 
> 
> 
> The problem I'm having is that the <interceptor-ref name="execAndWait" /> is
> interferring with the file upload. I haven't gone into in any more depth but
> if I remove this interceptor then the FileNotFoundException stops
> 
> -- 
> View this message in context: http://www.nabble.com/Struts-2-file-upload-tp21915019p21936355.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Liveā„¢: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Faster_022009

Re: Struts 2 file upload

Posted by Lund <pi...@hotmail.com>.


Lund wrote:
> 
> 
> 
> newton.dave wrote:
>> 
>> Lund wrote:
>>> I'm using Strurs 2.1.2 and the <s:file name="upload" label="File" /> tag
>>> in
>>> the jsp page. 
>>> My problem is that while the fileUpload appears to work most of the time
>>> I
>>> do get java.io.FileNotFoundException: on the .tmp file that Struts uses
>>> as
>>> part of the process (prob 1 in 10 times). Once this happens of course
>>> the
>>> whole process breaks down.
>>> 
>>> I boiled the whole process down to a simple test action and tested it
>>> repeatedly and also checked if anyone else had this issue. It appears
>>> that
>>> this issue was fixed as of 2.0.9 release but I am still seeing it.
>>> 
>>> I'm using commons-fileupload-1.2.1 and commons-io.1.3.2 
>>> 
>>> Any ideas before I abandon struts 2 fileupload?
>> 
>> Does the same thing happened with an actual release version of S2.1?
>> 
>> Dave
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> 
> 
> I've switched to release 2.1.6 and changed the multipartrequest processor
> to the Jason Pell version which has improved things. I'll re-post if I get
> the same issue again. What I noticed using the Jakarta processor was that
> the filename of the  *.tmp used would be out of range. I.e jakarta was
> looking for 5.tmp whereas the file available was 7.tmp
> 
> 
> 



The problem I'm having is that the <interceptor-ref name="execAndWait" /> is
interferring with the file upload. I haven't gone into in any more depth but
if I remove this interceptor then the FileNotFoundException stops

-- 
View this message in context: http://www.nabble.com/Struts-2-file-upload-tp21915019p21936355.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 file upload

Posted by Lund <pi...@hotmail.com>.


newton.dave wrote:
> 
> Lund wrote:
>> I'm using Strurs 2.1.2 and the <s:file name="upload" label="File" /> tag
>> in
>> the jsp page. 
>> My problem is that while the fileUpload appears to work most of the time
>> I
>> do get java.io.FileNotFoundException: on the .tmp file that Struts uses
>> as
>> part of the process (prob 1 in 10 times). Once this happens of course the
>> whole process breaks down.
>> 
>> I boiled the whole process down to a simple test action and tested it
>> repeatedly and also checked if anyone else had this issue. It appears
>> that
>> this issue was fixed as of 2.0.9 release but I am still seeing it.
>> 
>> I'm using commons-fileupload-1.2.1 and commons-io.1.3.2 
>> 
>> Any ideas before I abandon struts 2 fileupload?
> 
> Does the same thing happened with an actual release version of S2.1?
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 



I've switched to release 2.1.6 and changed the multipartrequest processor to
the Jason Pell version which has improved things. I'll re-post if I get the
same issue again. What I noticed using the Jakarta processor was that the
filename of the  *.tmp used would be out of range. I.e jakarta was looking
for 5.tmp whereas the file available was 7.tmp


-- 
View this message in context: http://www.nabble.com/Struts-2-file-upload-tp21915019p21929961.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 file upload

Posted by Dave Newton <ne...@yahoo.com>.
Lund wrote:
> I'm using Strurs 2.1.2 and the <s:file name="upload" label="File" /> tag in
> the jsp page. 
> My problem is that while the fileUpload appears to work most of the time I
> do get java.io.FileNotFoundException: on the .tmp file that Struts uses as
> part of the process (prob 1 in 10 times). Once this happens of course the
> whole process breaks down.
> 
> I boiled the whole process down to a simple test action and tested it
> repeatedly and also checked if anyone else had this issue. It appears that
> this issue was fixed as of 2.0.9 release but I am still seeing it.
> 
> I'm using commons-fileupload-1.2.1 and commons-io.1.3.2 
> 
> Any ideas before I abandon struts 2 fileupload?

Does the same thing happened with an actual release version of S2.1?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org