Tuesday, May 14, 2013

What is the difference between doGet () and doPost () or GET and POST?


doGet ():

The request parameters are transmitted as a query string
appended to the request. Allows browser bookmarks but not
appropriate for transmitting private or sensitive information.
http://MyServer/MyServlet?name=paul
This is a security risk.

GET was originally intended for static resource retrieval.


GET is not appropriate when large amounts of input data are
being transferred.

doPost():


The request parameters are passed with the body of the
request.
More secured.


POST was intended for input data submits where the results
are expected to change.



No comments:

Post a Comment