I want to take bulk datas from JSP.. So开发者_StackOverflow社区 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 ..
Increase the heap size by setting -Xmx
of the JVM
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.
精彩评论