What is the difference between doGet and doPost?
Answers were Sorted based on User's Feedback
Answer / janet
1. doGet() method is used to get information ,while
doPost() method is used for posting information.
2.doGet() requests can't send large amount of information
and is limited to 24-255 characters.How ever doPost()
requests passes all of it's data ,of unlimited length.
3. A doGet() request is appended to the request URL in a
query string and this allows the exchange is visible to the
client,where as a doPost() request passes directly over the
socket connection as part of its HTTP Request body and the
exchange are invisible to the client.
|Is This Answer Correct ?||99 Yes||22 No|
Answer / kalyan
1. In doGet() u submit the request by appending the URL
while in doPost() request is submitted via form.
2.Since doGet() appends the link it is not safe for request
containing passwords etc. while doPost() uses form hens it
3.You can send only limited data in doGet() while unlimited
data in doPost() .
4.doGet() request could used like a bookmark as it uses URL
but doPost() can't be used as bookmark.
|Is This Answer Correct ?||22 Yes||3 No|
Answer / ashish
they both r service methods.....
do get() has a disadvantage of sending very less amt of
information as it can send 24 to 255 character........
do post() is used for posting d information.....
|Is This Answer Correct ?||20 Yes||5 No|
Answer / ram
do get() is used for passess the information limited amount
do post() is used for passess the information.and it send
unlimited data..it is providing more secure compare 2 do get
|Is This Answer Correct ?||29 Yes||15 No|
Answer / ravi kumar
In doget() method there is a security problems are arrival
because when the user or client submit the form the
associated user name or password has been display on the
but in case of doPost() method when the user submit the
form the associated user name or password are not display
on the addressbar.
|Is This Answer Correct ?||2 Yes||0 No|
Answer / shivani
doGet is used when there is are requirement of sending data appended to a query string in the URL. The doGet models the GET method of Http and it is used to retrieve the info on the client from some server as a request to it. The doGet cannot be used to send too much info appended as a query stream. GET puts the form values into the URL string. GET is limited to about 256 characters (usually a browser limitation) and creates really ugly URLs.
doPost allows you to have extremely dense forms and pass that to the server without clutter or limitation in size. e.g. you obviously can't send a file from the client to the server via doGet. doPost has no limit on the amount of data you can send and because the data does not show up on the URL you can send passwords. But this does not mean that POST is truly secure. It is more secure in comparison to doGet method.
|Is This Answer Correct ?||2 Yes||0 No|
Answer / krish
How can we achieve security using doGet()??????
|Is This Answer Correct ?||0 Yes||1 No|
Answer / benjamin
thank all for your answers:
doGet simply request a ressource from server(e.g pages) by
opposite of doPost which can request a ressource and post
form data to a server
|Is This Answer Correct ?||4 Yes||6 No|
Answer / sfsf
Actually wonderful answer thank you
|Is This Answer Correct ?||16 Yes||20 No|
Is servlet a controller?
What is the procedure of invoking different servlet in a different application?
What is the use of servlet context?
request parameter how to find whether a parameter exists in the request object?
How can we refresh automatically when new data has entered the database?
Why do we need servlet filter?
Why filter is used in servlet?
What is servlet configuration?
Define the lifecycle for executing a jsp page.
give the syntax of doGet() and doPost()?
why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet used for coding business logic and controller logic. Reason for using servlets in business logic.
Explain the role of dispatcherservlet and contextloaderlistener.