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

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

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