-1

I parsed an XML file to DOM and with a java servlet I have formatted and displayed it in HTML. The result is a very long form with an input text added to each node. When retrieving data with HTTPServletRequest (POST), everything works fine until getting to the last text fields. I can not access them, as if they remain outside any memory limit or capacity (I can only access the first text fields 40-60 or so).

I tested different XML files and the same happens in all. I have looked for possible causes (MaxPostSize, multipart-config ..) and tried different solutions but so far not solved. I would like to know if any of you happened something like this to find possible causes and solutions.

Working with: Eclipse Luna 4.4.2, Tomcat 7, Java 8.

Gennadii Saprykin
  • 4,505
  • 8
  • 31
  • 41
Angel Picallo
  • 69
  • 1
  • 5

2 Answers2

0

By Default the maximum size of POST is 2MB.

References https://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html

Is there a max size for POST parameter content?

It is a better approach to implement pagination. it will improve the performance of the application.

Community
  • 1
  • 1
Clement Amarnath
  • 5,301
  • 1
  • 21
  • 34
  • Contrary to the popular belief, no, it will not improve performance to add pagination. However, it will improve scalability. For example, if you know the number of items to always be below 500, it might perform better to send it all at once. – pieroxy Aug 29 '21 at 17:39
0

Thanks Clement, This application will be deployed on another machine so my options for finding a solution would be:

  • No modifify the tomcat configuration file (server.xml).
  • Find some configuration through annotations in the servlet.
  • Find some configuration in web.xml
  • If none of the above works, limit the amount of request by pagination, although the users (system administrators) prefer a single screen scroll bar. At this case will try to use a horizontal pagination as similar as possible to a scroll fluid and allow delimit POST request.
Angel Picallo
  • 69
  • 1
  • 5