How are parameters sent in an HTTP POST request?

In an HTTP GET request, parameters are sent as a query string: http://example.com/page?parameter=value&also=another In an HTTP POST request, the parameters are not sent along with the URI. Where are the values? In the request header? In the request body? What does it look like? 9 The values are sent in the request body, in the … Read more

What is the difference between response.sendRedirect() and request.getRequestDispatcher().forward(request,response)

To simply explain the difference, response.sendRedirect(“login.jsp”); doesn’t prepend the contextpath (refers to the application/module in which the servlet is bundled) but, whereas request.getRequestDispathcer(“login.jsp”).forward(request, response); will prepend the contextpath of the respective application Furthermore, Redirect request is used to redirect to resources to different servers or domains. This transfer of control task is delegated to the browser by … Read more