Hi Help me out. What is the basic difference between Get and Post method apart from following two : (1) In Get method, we can attach Query String and URL can be bookmarked. Here, we can pass limited data. (2) In the Post method, we can pass any amount of Data. I was asked to tell five difference apart from these two. Thanks. Rakesh
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Here are some 1. GET method retrieve data by SQL queries POST to update data. 2. POST you can use Streams. 3. GET restricts based on URL length wheras these are not there in POST. 4. In POST data is hidden from user whereas in GET the URL is visible. These are some that i know. Hope i am able to add to knowledge. Bye SimpleSteps
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Dear SimpleSteps Whatever we use GET method, It limits the URL length and In the Post, We can send any amount of data. So, I think, third and fourth point given by you is ok short of. Any way thanks for that. Rakesh
Naveen Chandra
Greenhorn
Joined: Feb 08, 2000
Posts: 12
posted
0
Hi Guys, By the way what is the maximum length of the URL that one can generate and send across the web. Thanks in advance, Naveen.
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
IMHO About 250 characters
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
IMO, (one of my friends said this, really) the limitation on URL is 1 kb (whatever that means). regds. - satya
hmmm.....5 differences....here goes my attempt doPost:
Called by the server (via the service method) to allow a servlet to handle a POST request.
POST method allows the client to send data of unlimited length to the Web server a single time
useful when posting secure data (like credit card numbers)
This method does not need to be either safe or idempotent.
Operations requested through POST can have side effects for which the user can be held accountable, for example, updating stored data or buying items online.
doGet:
Called by the server (via the service method) to allow a servlet to handle a GET request.
Overriding this method to support a GET request also automatically supports an HTTP HEAD request.
The GET method should be safe, that is, without any side effects for which users are held responsible.For example, most form queries have no side effects.
If a client request is intended to change stored data, the request should use some other HTTP method.
The GET method should also be idempotent, meaning that it can be safely repeated.
so did you get the arithemetic right.... I am not an expert in Servlets but definetly know where to look... ... You can find all this and much more at the J2EE API Specs enjoy..... Regds. - satya
Arathi Raj
Ranch Hand
Joined: Nov 22, 2002
Posts: 90
posted
0
Hi
Operations requested through POST can have side effects for which the user can be held accountable, for example, updating stored data or buying items online.
Can anyone explain me this in detail. How Post will have side effects. when sendind date through this method is safe?
Also I want to know
GET method retrieve data by SQL queries POST to update data. What does these mean. Explain this also.