Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

size of request data ?  RSS feed

 
Anil Kumar Saha
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get the size of request data (for example x KB or y MB)in the web-server? Suppose,the request is HttpServletRequest and method is POST.
Any ideas/thoughts will be appreciated.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the method getContentLength() of the interface ServletRequest

ServletRequest.getContentLength()
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!