I am writing a client server program. I am sending an arraylist from an android phone and I am able to receive the list also. After that I want the servlet to redirect to
Instead of using
response.sendRedirect("/demo.jsp");
Which does a permanent redirect to an absolute URL path,
Rather use RequestDispatcher. Example:
RequestDispatcher
RequestDispatcher dispatcher = request.getRequestDispatcher("demo.jsp"); dispatcher.forward(request, response);