I simply want to forward a request of one servlet to another servlet. Authentication Servlet gets a request from a jsp page and thus authenctication servlet passes the request to another Addtocart servlet.
AuthenticationServlet Code:
RequestDispatcher rd= request.getRequestDispatcher("/Addtocart");
rd.forward(request, response);
response.sendRedirect("Addtocart");
Addtocart servlet code:
String pid = request.getParameter("txtproductid") ;
String pname = request.getParameter("txtproductname");
String pprice = request.getParameter("txtproductprice");
out.println(pid);
out.println(pname);
out.println(pprice);
However not the desired output I suppose some problem in my code... Do rectify it!!! thank you in advance