How can we send a POST request when we call getRequestDispatcher() functions ? It is easy to make a GET request but I don't know how for POST one.
Unfortunately, the servlet spec does not allow you to change the HTTP method of a dispatched request (from GET to POST or vice versa).
This is a problem if you want to call a servlet that only responds to a POST request, or that has different implementations for doGet and doPost. (This is poor servlet design, but using someone else's servlet, you may not have a choice.)