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?

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 is the use of httpservletrequestwrapper and httpservletresponsewrapper?

189


What are the phases of a servlet life cycle?

246


What is the use of send redirect () method?

229


What does the term localization refer to?

223


What is the use of servlet wrapper classes?

271






Which exception is thrown if the servlet is not initialized properly?

191


What are the advantages of cookies?

286


How to generate the server side programming and the advantages of it over the other languages?

218


Why do we use sendredirect() method?

204


What are the different ways we can maintain state between requests?

211


What is Client-Server Computing?

1525


How to get the current httpsession object?

254


What is the element?

258


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

205


Explain the differences between jsp and servlet.

210