Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What is the difference between doGet and doPost?

Answers were Sorted based on User's Feedback



What is the difference between doGet and doPost?..

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

What is the difference between doGet and doPost?..

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
is safe.

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

What is the difference between doGet and doPost?..

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

What is the difference between doGet and doPost?..

Answer / ram

do get() is used for passess the information limited amount
of data.

do post() is used for passess the information.and it send
unlimited data..it is providing more secure compare 2 do get
() method..

Is This Answer Correct ?    29 Yes 15 No

What is the difference between doGet and doPost?..

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
addressbar.

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

What is the difference between doGet and doPost?..

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

What is the difference between doGet and doPost?..

Answer / krish

How can we achieve security using doGet()??????

Is This Answer Correct ?    0 Yes 1 No

What is the difference between doGet and doPost?..

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

What is the difference between doGet and doPost?..

Answer / sfsf

Actually wonderful answer thank you

Is This Answer Correct ?    16 Yes 20 No

Post New Answer



More Servlets Interview Questions

Is servlet a controller?

0 Answers  


What is the procedure of invoking different servlet in a different application?

0 Answers  


What is the use of servlet context?

0 Answers  


request parameter how to find whether a parameter exists in the request object?

0 Answers  


How can we refresh automatically when new data has entered the database?

0 Answers  






Why do we need servlet filter?

0 Answers  


Why filter is used in servlet?

0 Answers  


What is servlet configuration?

0 Answers  


Define the lifecycle for executing a jsp page.

0 Answers  


give the syntax of doGet() and doPost()?

2 Answers  


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.

5 Answers  


Explain the role of dispatcherservlet and contextloaderlistener.

0 Answers  






Categories