what is the difference between doGet() and doPost()?
Answers were Sorted based on User's Feedback
Answer / annamalai
Hai doGet() method is the default HTTPServletRequest method.
In this user entered data is appended to the URL as query
String. It can send only limited amount of data. In doPost()
method the user entered information as data and not appended
to the URL.It can send any amount of data.
Is This Answer Correct ? | 29 Yes | 1 No |
doGet() doPost()
1)doGet() method can send 1)doPost() method can send
limited amount of data large amount of data.
i.e.upto 256 characters
only.
2)In doGet() method when we 2)In doPost() methodrequest
send request then in Request is passed along withbody
Format there is no body part, part of theRequestFormat.
the request is passed along doPost() method Request
with only Request Format header Format has both body and
part only. header part.
3)doGet() method send limited 3)large amount data has
data because it has only header sent through body part
part,header part has limited of the RequestFormat.
memory to carry the data.
4)doGet() method support book 4)doPost() method doesn't
marks. support book marks.
5)when we send request parameters 5)The requested parameter
in doGet() it will display the in doPost() will not dis
information in URL as a query play the information as
string.so in doGet() data there a query string in URL.so
is no data security. data is secured.
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / srivani
do Get() method carry only 255 characters of data.In depends
on browsers 1024 is carried.But do post() carry more than 255.
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / venkat
whenever we use doGet() method query string will be appear
on the address bar.
but doPost() does't appear on the address bar.
doGet() method is send limited amount of data
doPost() method is send unlimited amount of data
using doGet() method we can't solve idem potent problem.
using doPost() method we can solve idem potent problem.
doGet() is faster
doPost() is slow.
doGet() method is get method based request
doPost() method is post method based request
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sharief
doGet() append the data to the link.
doPost() will not append the data to the link.
Efficiency is less for doPost() than doGet().Hence,doGet()
usage is more when compared to doPost().
only 255 characters are restricted for doGet(),where as
doPost() doesnt have any restrictions.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rajkumari meena
the perticular data is sent to the server by dopost()
doget() is move to the next page
Is This Answer Correct ? | 0 Yes | 0 No |
servlet life cycle?
How can you start a jta transaction from a servlet deployed on jboss?
What are the objects involved when a servlet receives a call from client?
Is that servlet is pure java object or not?
what is SSL?
Why do we have servlet filters?
What is the use of welcome-file-list?
How to find whether a parameter exists in the request object?
What is the difference between a generic servlet and http servlet?
How to get the server information in a servlet?
request parameter how to find whether a parameter exists in the request object?
How to debug a servlet?