0

I want to take bulk datas from JSP.. So i have to use method="post".. At the same time i have to upload images using 'enctype'.. When i use both method="post" and 'enctype' then out of memory: heap size overflow message is coming. I want to take bulk data along with image upload.. Is it possible..? How..? Plz answer my question ..

Madhan
  • 1

2 Answers2

0

Increase the heap size by setting -Xmx of the JVM

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
0

Use Apache Commons FileUpload to process multipart/form-data requests. It not only eases splitting and gathering uploaded files in the Servlet side, but it also allows for fine-grained memory configuration. Even more, the DiskFileItemFactory has a default threshold size of 10KB. The remnant will be written to disk.

For a short but complete example how to use it, see also this answer.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555