are you sure that a new instance of your action is created everytime,
like if using spring, scope="prototype"?

musachy

On Wed, Oct 14, 2009 at 2:20 AM, Alex Siman <[email protected]> wrote:
>
> Yes, it is very strange behaviour...
>
> Say action with "multipart/form-data" is named UploadAction. And we have
> another action AnotherAction. If we execute UploadAction couple times, then
> execute AnotherAction, and then again return to UploadAction the all
> properties of it will be prepended with previously entered values. WTF.
>
> Musachy Barroso wrote:
>>
>> why do you think it stores them in the session? that sounds weird.
>>
>> musachy
>>
>> On Tue, Oct 13, 2009 at 4:58 PM, Alex Siman <[email protected]>
>> wrote:
>>>
>>> If form uses [enctype="multipart/form-data"] then Struts2 stores request
>>> params in session (I suppose, at least not in request). And with every
>>> form
>>> submit Struts2 prepend prev value of parameter to a new one separated by
>>> a
>>> comma.
>>>
>>> Example:
>>>
>>> update.jsp
>>> ----------------------
>>>        <s:form action="upload" enctype="multipart/form-data">
>>>                ...
>>>                <s:textfield name="desc" label="Description"/>
>>>                ...
>>>        </s:form>
>>> ----------------------
>>>
>>> Suppose we have submited form multiple times:
>>> 1) set "desc" to "1", then "desc" will be "1".
>>> 2) set "desc" to "2", then "desc" will be "1, 2".
>>> 3) set "desc" to "3", then "desc" will be "1, 2, 3".
>>> ...
>>> n) set "desc" to "n", then "desc" will be "1, 2, 3 ... , n-1, n".
>>>
>>> This issue appeared after I upgraded to Struts 2.1.8:
>>> - ognl-2.7.3.jar
>>> - struts2-core-2.1.8.jar
>>> - struts2-fileupload-plugin-2.1.7-SNAPSHOT.jar
>>> - xwork-core-2.1.6.jar
>>>
>>> Is this bug or feature? How to fix this?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Bug%3A-Struts-2.1.8-and-%22multipart-form-data%22-tp25883021p25883021.html
>>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Bug%3A-Struts-2.1.8-and-%22multipart-form-data%22-tp25883021p25887830.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to