This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
To make the ActionForm include fields to upload the file, I change
Then when I update the actionForm with more than 200 fields, I got the error "java.lang.OutOfMemoryError: Java heap space".
I use a map in the actionForm to store those fields values as: .
If I decrease the fields to less 200, it works fine. But When there is over 200 fields, it will has the memory error though the form does not include the upload file.
I am wondering why I could upload like 2M file with the form without problem, but it can not handle the case when the form has many fields. And solutions for it? In some cases, it will have more fields like 300 or 400 a form. And I do need upload feature as well.
Yeah, this form is created dynamically based on some template. For example, creating a question and answer form. If the template allows 10 max question and 20 max for answer, when form is created according to its max, each page will have 10 questions and 20 answers per question, which will be 210 field in this case. Though user may only input a few questions, but the form need to be that big.