• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Max length of request parameter

 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic