• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error: "java.lang.OutOfMemoryError: Java heap space"with method="POST" enctype="multipart/form-data"

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

To make the ActionForm include fields to upload the file, I change
to .

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.

Thanks for the help!!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A form with several hundred fields?!
 
david arnold
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic