File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes What is max size of the Data in request? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is max size of the Data in request?" Watch "What is max size of the Data in request?" New topic

What is max size of the Data in request?

azhar jodatti

Joined: Oct 18, 2009
Posts: 12
if someone ask the diffrence between doGet () and doPost() method
then one can say that with doGet() we can send only 258 bytes but with
doPost () we can send more..

but what is mean by more.

what is the maximum size we can send from browser to server..

thanks in advance...

Anshul Agrawal

Joined: Jul 15, 2008
Posts: 19
with doGet the data sending is limited...with doPost you can submit the whole form...

Ra Re

Joined: Nov 13, 2009
Posts: 6
Before answering the question, I guess we all know that an HTTP GET request sends the data appended to the URL as query String, and that a HTTP POST request sends the data inside the body.

Now, about the GET, I don't share your 258 bytes
<<URIs cannot be longer than 256 characters. This was a limitation in some server implementations, and while servers continue to have limitations to prevent denial-of-service attacks, they are generally at least 4000 characters, and they evolve as the legitimate uses of application developers evolve.>>
...and is not me who is saying this:

And about the POST, as I stated before, the information is stored in the body of the HTTP request. Thus, if there is enough hardware performance, I guess* you can send for example a 1GB HTTP request (and even more). But then, while you are waiting to send it all, you can take this opportunity to think about what you did wrong. Because you must have done something wrong if you need to send such amount of data in an HTTP request.

Hope it helps!

*I never tried it, seriously.
I agree. Here's the link:
subject: What is max size of the Data in request?
jQuery in Action, 3rd edition