• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get and Post  RSS feed

 
trupti nigam
Ranch Hand
Posts: 640
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What is the basic difference between the GET and POST methods?
thanks in advance..
trupti
 
Thomas Skowronek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The doGet method is for handling HTTP GET requests and the doPost method is for handling HTTP POST requests.
If a client clicks a hyperlink a GET is sent to the server, which causes the doGet to be invoked.
If a client submits a form, generally a POST is sent to the server, which causes the doPost to be invoked.
For more detailed information on POST and GET see the spec at:
http://www.ietf.org/rfc/rfc2616.txt
 
Judy Herilla
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When calling a servlet you can choose whether to invoke POST or GET from your form.
form action="POST" or form action="GET"
if you choose "GET" the information you are sending will be displayed in the URL, while "POST" hides this information.
Also, I dont remember the exact amount but you can send MORE infomration using a POST rather than a GET
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!