What is the difference between doGet and doPost?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can an existing session be invalidated?

655


What is servlet collaboration?

652


What is servlet interface?

694


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

551


List out the difference between ServletConfig and ServletContext?

592






Why is httpservlet declared abstract?

574


How we can call a jsp from the servlet?

522


How can I send user authentication information while making URL Connection?

532


Explain load on start-up and its importance?

590


Why do we use sendredirect() method?

540


How do you design microservices?

613


Does servlet have main method?

678


What is dispatcher servlet?

548


How do you configure a centralized error handler in servlets?

529


What is the use of java servlet api?

590