Click to See Complete Forum and Search --> : Servlet, when doGet and doPost ??????
yna54
November 12th, 2000, 08:57 PM
Could you please explain to me in a servlet when to use :
1) only doGet
2) only doPost
3)both of them
4)And why sometimes we implement one and the other one called the one that has been implemented.
I will appreciate if you can mention me some examples in each case
Thanks
dlorde
November 13th, 2000, 07:43 PM
"In short, POST requests are for sending any amount of data directly over the connection without changing the URL, and GET requests are for getting limited amounts of information appended to the URL. POST requests cannot be bookmarked or emailed and do not change the Uniform Resource Locators (URL) of the response. GET requests can be bookmarked and emailed and add information to the URL of the response."
There's plenty more at:
http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/servlet.html
http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/servlets.html
and
http://java.sun.com/docs/books/tutorial/servlets/client-interaction/req-res.html
Dave
To email me remove '_spamjam' from my email address
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.