I have scenario that, I want to upload multiple files, In which User may or may not upload files, And I want to maintain Index at which position user has uploaded file and want to save file with that index as Name
I referred https://stackoverflow.com/a/17050230/3425489 , In my case I don't want to create new class, so not referred Accepted solution
till now In my Action Class I have
File upload [];
String uploadContentType []
String uploadFileName []
getters and setters
In my jsp I tried
<input type="file" name="upload">
but I'm able to get uploaded files only, not able to maintain index
also tried
<input type="file" name="upload[0]">
<input type="file" name="upload[1]">
<input type="file" name="upload[2]">
with this case, I'm not able to setProperties in my Action class
----Updated----
You can refer my Model Struts 2 : Unable to access Model properties in JSP
For your every ProcessSolutionStep, I want to maintain, which file is uploaded for particular step,
i.e. User may upload file for step 1 and step 5, skipping middle steps, and in view.
I want to display file uploaded for particular step