You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bob <to...@excite.com> on 2007/01/30 20:24:56 UTC

[s2] file upload causing param problems




Hi.  I am having some strange problems when using the file upload interceptor.  When I use the file upload, I experience an extremely erratic behaviour where sometimes my request params get set on my action and sometimes they do not.  All params from my form are either there or not there; this means that when they make it through to my action, its all of them -- both the non file upload related ones as well as the File itself.  

Anyone else seeing this?  I removed the file upload part and the transfer of params works perfectly, so its something there.  



_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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


Re: [s2] file upload causing param problems

Posted by Andrew Stepanenko <an...@gmail.com>.
Hello,

I had the same problem with s2 some time ago. At that time I was using
customized 2.0.2 SNAPSHOT.
Check out this forum post at WebWork users forum:
http://forums.opensymphony.com/thread.jspa?messageID=111939

After upgrading to 2.0.3 SVN snapshot and setting ActionContextCleanUp
filter in web.xml multipart/form-data forms started to work as
expected.

Regards,
Andrew Stepanenko

P.S. 2.0.3 because we use a customized build with some additional tags
in the tag library, so we don't follow latest struts2 releases
quickly.

On 1/30/07, bob <to...@excite.com> wrote:
>
>
>
>
> Hi.  I am having some strange problems when using the file upload interceptor.  When I use the file upload, I experience an extremely erratic behaviour where sometimes my request params get set on my action and sometimes they do not.  All params from my form are either there or not there; this means that when they make it through to my action, its all of them -- both the non file upload related ones as well as the File itself.
>
> Anyone else seeing this?  I removed the file upload part and the transfer of params works perfectly, so its something there.
>
>
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: [s2] file upload causing param problems

Posted by Nagraj Rao <na...@sigmainfo.net>.
Even i'm not sure what has been causing this. But probably you can just 
check your lib to contain commons-lang-1.1.1.jar instead of 
commons-lang.jar(remove this in case it exists).

----- Original Message ----- 
From: "Dariusz Wojtas" <dw...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>; 
<to...@excite.com>
Sent: Wednesday, January 31, 2007 1:11 AM
Subject: Re: [s2] file upload causing param problems


>I had similar problems with fileupload last weekend.
> At first I thought that it could be caused by a filter that I have in
> front of my app - prints the URI and all params to the console - does
> the processing before analising multipart data.
> But I modified the filter to get/print that info after processing the 
> action.
> I even disabled the filter - it did not fix it.
> I had no exceptions.
> The params were just not set.
>
> Now it seems to work but I am really not sure what exactly fixed the 
> issue.
> I am using the default config, commons-upload with S2.0.4.
>
> Dariusz Wojtas
>
> On 1/30/07, bob <to...@excite.com> wrote:
>>
>>
>>
>>
>> Hi.  I am having some strange problems when using the file upload 
>> interceptor.  When I use the file upload, I experience an extremely 
>> erratic behaviour where sometimes my request params get set on my action 
>> and sometimes they do not.  All params from my form are either there or 
>> not there; this means that when they make it through to my action, its 
>> all of them -- both the non file upload related ones as well as the File 
>> itself.
>>
>> Anyone else seeing this?  I removed the file upload part and the transfer 
>> of params works perfectly, so its something there.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


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


Re: [s2] file upload causing param problems

Posted by Jia Guo <gu...@gmail.com>.
Yes, I have the same problem. I used multipart/form, and I have file
element.
It always happen when I post the data at first time, or after I refresh the
page by clicking F5 or browser's Refresh button.
And it might(not always) work correctly when I post it again. No matter I
upload a file or not.

If I remove the file element, the form worked perfectly.

I will check the common-lang version problem tomorrow, but I still want to
know the exactly reason.
Did anybody fix this problem before? Any suggestion would be appreciated.

2007/1/31, Dariusz Wojtas <dw...@gmail.com>:
>
> I had similar problems with fileupload last weekend.
> At first I thought that it could be caused by a filter that I have in
> front of my app - prints the URI and all params to the console - does
> the processing before analising multipart data.
> But I modified the filter to get/print that info after processing the
> action.
> I even disabled the filter - it did not fix it.
> I had no exceptions.
> The params were just not set.
>
> Now it seems to work but I am really not sure what exactly fixed the
> issue.
> I am using the default config, commons-upload with S2.0.4.
>
> Dariusz Wojtas
>
> On 1/30/07, bob <to...@excite.com> wrote:
> >
> >
> >
> >
> > Hi.  I am having some strange problems when using the file upload
> interceptor.  When I use the file upload, I experience an extremely erratic
> behaviour where sometimes my request params get set on my action and
> sometimes they do not.  All params from my form are either there or not
> there; this means that when they make it through to my action, its all of
> them -- both the non file upload related ones as well as the File itself.
> >
> > Anyone else seeing this?  I removed the file upload part and the
> transfer of params works perfectly, so its something there.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Guo Jia

Re: [s2] file upload causing param problems

Posted by Dariusz Wojtas <dw...@gmail.com>.
I had similar problems with fileupload last weekend.
At first I thought that it could be caused by a filter that I have in
front of my app - prints the URI and all params to the console - does
the processing before analising multipart data.
But I modified the filter to get/print that info after processing the action.
I even disabled the filter - it did not fix it.
I had no exceptions.
The params were just not set.

Now it seems to work but I am really not sure what exactly fixed the issue.
I am using the default config, commons-upload with S2.0.4.

Dariusz Wojtas

On 1/30/07, bob <to...@excite.com> wrote:
>
>
>
>
> Hi.  I am having some strange problems when using the file upload interceptor.  When I use the file upload, I experience an extremely erratic behaviour where sometimes my request params get set on my action and sometimes they do not.  All params from my form are either there or not there; this means that when they make it through to my action, its all of them -- both the non file upload related ones as well as the File itself.
>
> Anyone else seeing this?  I removed the file upload part and the transfer of params works perfectly, so its something there.

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