Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maximum allowable length when POST used

 
vikram bollu
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the maximum allowable length for a hidden field if the form method is POST?
 
jatan bhavsar
Ranch Hand
Posts: 297
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vikram ,

If there is post method then there isnt any max limit for request parameter including hidden ,but some contianer or server set the maxpost size like tomcat does in server.xml , and if get is used there is limit of 255 characters only.

Regards
Jatan
 
vikram bollu
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply, I know about the GET. But when I am trying with POST with huge data it is giving OutofMemory exception so I used session.
I am using weblogic. So, do you think we can set max size for POST at server side (any server like tomcat as you said), if yes could you tell me how to set for weblogic
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The actual limit on the total size of a POST is essentially unlimited. After all, a POST can contain multiple large file uploads.

However, file uploads are intercepted and (usually) spooled to a temporary disk file. Form values, on the other hand, are more likely to result in direct in-memory object creation. A String, in this particular case.

You'd get an out-of-memory exception in the event that the size of the resulting string - or the sum total of the sizes of the intermediate objects at any point in the processing - exceeds available free memory. You'd probably get something like an Array Index Bounds Exception if the input had simply exceeded some internal structure size.

So, in theory, you could just use the "IBM" solution (Install Bigger Memory). In practice, however, if you're transmitting data that's that large, you're really putting pressure on performance. The more data, the longer it takes to transmit it, and the bigger the load on the network. And that's not even counting the possibility that you could blow out memory on the client side, where you have no control over how much memory is allocated.

And, if that isn't enough incentive, the more data you send that way, the more likely you're sending sensitive information. A well-designed webapp keeps as much of the sensitive data on the server as it can, since once data gets on the open Internet and into clients, it can be intercepted, decrypted (hopefully it WAS encrypted), and even modified.
 
Jayesh A Lalwani
Rancher
Pie
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How big is your form? I've never seen a form so big that it causes the server to go OOM. Not saying it can't happen. Just that it's very unlikely.

Most likely, you are using up memory while processing the big form. It may not be the form that is the problem, but the design of the servlet/action that handles the form that may be the problem. Have you determined that the servlet/action is not the problem?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic