• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Max length of request parameter

 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone know if there is a maximum length of a string value being posted from a form? The thread seems to just freeze when I try to pull this value out of the request in my servlet. Is this container specific? I am using tomcat.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the request is a POST, there's no max length other than good sense.

If a GET, there is a browser-dependent length that limits the length of the query string.

Bottom line, use POST when appropriate.
[ December 12, 2007: Message edited by: Bear Bibeault ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thread seems to just freeze when I try to pull this value out of the request in my servlet.


You need to look elsewhere for the problem, getting a value from a request should be very quick. Kindly give us more information about the setup you are working with, how the request is generated, what you are doing with the data, etc.

Bill
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As suggested, if it just hangs when
the form is submitted, check your form method.
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The form method is set to POST. The parameter value in question is set as a hidden input in the form. In the servlet:


Nothing special going on here as far as I know. The only thing that seems out of the ordinary is the value (as seen in the page source) is very long.
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add more about the environment.

Using:

Tomcat 5.5
Java 5
Servlets/JSPs - no fancy frameworks
debugging with sysdeo eclipse plugin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic