java - What is the difference between doGet and doPost? -
this question has answer here:
- doget , dopost in servlets 5 answers
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
Post a Comment