• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there any size restriction for post method?

 
karthik Suryanarayanan
Ranch Hand
Posts: 121
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys,
i have encountered an issue.Help me in resolving this.

<code>
document.forms[0].action = x;
document.forms[0].method= 'post';
document.forms[0].submit;
</code>

In this code , the jsp calls a servlet. when the value of x is very large , say 500 to 600 it's not going to the servlet.It's getting stuck up. When the value of x is small it's calling the Servlet & executing the next sequence of steps inside the servlet. Even after giving post method why does it occur like this .? Any Help Ranchers.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would the value of x, the form's action URL, be large?

If you are sticking a query string full of parameters onto a POST, you are doing it wrong!

If that's what you are doing, the length restriction has nothing to do with the POST data, which should be in the body of the request. You can achieve this with form elements in the form -- hidden if you do not want them visible.

There is a length restriction to URLs -- not post data.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. UBB code tags use square brackets.
 
karthik Suryanarayanan
Ranch Hand
Posts: 121
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bear. I got it.I have got it working with hidden fields.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at bear
in the body of the request.


If i set the data inside in the request body as shown below :



If i set data as in the above format will Get Or Post come into picture ??

please advise , thanks in advance .


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i set data as in the above format will Get Or Post come into picture ??


It is not real clear where you are trying to do this.

It is the HTTP method "GET" or "POST" which determines which method gets called.

If you are trying to create a custom request header on the client side, you can extract the contents of your custom header with regular request methods but don't expect to be able to pass large amounts of text in your Data header.

Normal uses of HTTP headers all involve short text strings.

Whats wrong with passing parameters in the body of the request in the usual practice??

Bill
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill for the explanation .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!