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

What are the different types of servlets?

512


What are the features added in Servlet 2.5?

765


How many objects of a servlet is created?

788


What's the difference between servlets and applets?

557


Which is better jsp or servlet?

553






I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

2228


What is called Scriptlet?

559


What do you mean by singlethreadmodel interface?

578


How to read request headers from servlets?

562


Difference between httpservlet and generic servlets?

602


Why is http protocol called as a stateless protocol?

535


Can you explain in detail 'javax.servlet' package?

543


Explain in brief the directory structure of a web application?

566


Can we fetch the attributes related to a servlet on a different servlet?

628


Which application server is best for java?

556