0

I am using AJAX to send requests to doPost method.

When I add large amount of data to the request, I cannot get the request in the Servlet class. The page just hangs without causing an error.

If I send less data with AJAX request,its working fine.

Any help is appreciated.

vijay
  • 637
  • 3
  • 9
  • 20

2 Answers2

1

There could be a lot of reason for this to happen. I suggest you (if you can) to look at the server side application you are pointing with your ajax post request. That application could not manage such a large request you are trying to do and simply drop it silently.

Moreover the great part of web servers, allow the administrator to configure the maximum size of requests, so that if your request exceed such amount it will be dropped.

If you don't find your way, you may also find useful to see what really happens 'under the hood' using tools like Firebug http://getfirebug.com for Firefox, or Opera DragonFly, or Safari Web Development Tools, ecc..

In some extreme cases using sniffer like tcpdump or Wireshark could help you improve your knoledge of what is really happening.

Giova
  • 1,879
  • 1
  • 19
  • 27
0

Looks like this can be resolved by changing the Request Limit in Apache configuration (if you use Apache):

LimitXMLRequestBody 0 

In the example above, 0 means unlimited. But you can set a larger-than-default number that works for you.

More info: http://httpd.apache.org/docs/2.2/mod/core.html#limitxmlrequestbody

andrewsi
  • 10,807
  • 132
  • 35
  • 51
DevCat
  • 83
  • 2
  • 10