How does a servlet differentiate between GET and POST requests?

  • By request headers
  • By session cookies
  • By the request URL
  • By the request body
A servlet differentiates between GET and POST requests by examining the request body. GET requests append data to the URL, while POST requests send data in the request body.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *