aspose file tools*
The moose likes Servlets and the fly likes Regarding dopost() ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Regarding dopost() ?" Watch "Regarding dopost() ?" New topic
Author

Regarding dopost() ?

Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
Hi,

Like the way we can have lenght of request object cannot be morethan 256 bytes for method=get in form action , Is there any limit on the number of the parameters for method=post in form action ?

Thanks in Advance

"A True Friend will never hurt"


Hari.K,<br />+919886082889
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by hareendranath babu Kotha:
Hi,

Like the way we can have lenght of request object cannot be morethan 256 bytes for method=get in form action , Is there any limit on the number of the parameters for method=post in form action ?

Thanks in Advance

"A True Friend will never hurt"


There will be some limit, but I think, that depends on server. And I can think that, that would be very high... :roll:
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

256 bytes is the value specified by the RFC. In practice this can be higher, but the value depending on the client, server, proxy and just about anything it goes past. It is also not specified what he behaviour is or should be when you send a value greater than this - some will reject it, some truncate it and others will return an error from the server.

In practice you can send values that are larger, but how large would you like to go? POST is better for large values.
Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
confused:
what actually the problem is when i retrieved set of records (for example 600 records) from DB with out mentioning method type in form action i'm getting nullpointer exception, and after some hours of R&D i tried with method=post , then i got the records.

My doubt is whether it will work for set of some 6000 or morethan that number of records now are not. i dont have that many records in my application.

Thanks in advance,

" A true friend will never Hurt" :
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

get and post have nothing to do with the database query, but they can affect the way the data you pass in it treated. If you pass the OIDs in as myurl?OIDs=1%202%203%204%20 etc etc for 600 records then there is a fair chance your run into problems. If your OIDs are big, say 8 to 10 characters each then you suddenly have 6000 characters in your GET request, about 24 times the recommendation.
Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
Hi,
That's Ok. My question is how many number of Parameters we can post using method=post option.

Thanks in Advance,

" A true Friend Will Never Hurt"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding dopost() ?