What is the difference between doGet and doPost?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do cookies work in servlets?

573


What is a servlet context object?

615


What is the advantage of Servlets when compared with other server side technologies?

1849


What are the functions of the servlet container?

1019


How is an application exception handling is done using a servlet?

531






What is the difference between 2 types of servlets?

634


Can we get PrintWriter and ServletOutputStream both in a servlet?

646


How do we go with database connection and log4j integration in servlet?

687


Which is better jsp or servlet?

545


How does Cookies work in Servlets?

645


How is a servlet implemented in code?

557


What do you mean by web applications?

618


How do I know if java is running on linux?

596


What is the main purpose of java servlets?

572


What is servlet and its use?

621