I have a problem with the value staack in Struts 2.
Let's say I have an object called 'Article' and to this article I can upload some photos.
Inputs like this:
<s:file id="file1" name="file1"/>
<s:file id="file2" name="file2"/>
<s:file id="file3" name="file3"/>
<s:file id="file4" name="file4"/>
I fill first file (file1) and submit action. Then I navigate through another action and decide to upload another photo. In the same JSP, I fill second file (file2) and submit.
The problem is that in the in the second submit, in the action, I receive file2, and file1!
Shouldn't valueStack deleted file1 when the first action call finish? I receive and error on method:
ImageIO.read(file)
Because photo can't be read..
Must I clean the value stack myself after action finish with an interceptor?