java - What is the difference between doGet and doPost? -


this question has answer here:

public void doget(httpservletrequest request,httpservletresponse response){ } 

and

public void dopost(httpservletrequest request,httpservletresponse response){ } 

in http protocal , post type of request headers. whenever type of request recieved server, doget() method invoked @ backend. same goes post, dopost() invoked.

example: invoke doget when html form submitted.

<form method="get" action="servletname"> 

this invoke dopost()

<form method="post" action="servletname"> 

there more request type headers put, delete used implementing rest api.


Comments

Popular posts from this blog

sql - MySQL - Finding Empty relations -

javascript - Why jQuery Select box change event is now working? -

c - Android and JNI real time clock -