This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
for your information, my input form is dynamic base on listQuestion, if listQuestion have three images then in screen will be show three input file and if listQuestion have five images then in screen will be show five input file.
my problem is listQuestion have five images, when i'm submit the form, five images can uploaded on server n database but first image until fifth image is same. (all images is same with lastest image choosed) .
i know my mistake is in the attribute of class form (attribute image) but i'm confused how to make the all images can saved on list or array then when i try upload that image, i'm just iterate the list of image.
You are right, there is a definite problem with the form. What we are having here is a list of FormFiles and we are just having one place holder for it. What we are doing above is we iterate the same FormFile and hence it takes the last assignment. Either we need to have a array of FormFile's and we need to do index it int the JSP. Have you seen this thread with (supposed to be) working solution
Have Fun with Java
little,little.. little by little makes a lot..