This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Determining the size in memory for any single object is difficult. You should be able to get an idea by looking at the source code (I'm assuming you are using Tomcat and can get the source code). Basically there are a bunch of Strings for the various headers and parameters and some sort of Map to provide for lookup.
Of all the things that consume memory in servlet applications, the request should be the least of your worries since the attached objects are available for GC as soon as the response is returned.
Thanks for your answers, ly aim isn't to measure the reuest itself but the size of the memory used between the moment where the appserver received the request and the moment where it send the response. This is for evaluate the memory need for several parallele users.
Author and all-around good cowpoke
Not only can you then look at the memory usage, but also at the response times under a varying load. In my case I wrote an XML file defining the user transactions to drive the load tester. I also stuck a simple response time histogram collector in the servlet.