response.sendRedirect() from Servlet to JSP does not seem to work

前端 未结 4 389
滥情空心
滥情空心 2020-12-11 14:59

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

4条回答
  •  醉梦人生
    2020-12-11 15:26

    I'm posting this answer because the one with the most votes led me astray. To redirect from a servlet, you simply do this:

    response.sendRedirect("simpleList.do")
    

    In this particular question, I think @M-D is correctly explaining why the asker is having his problem, but since this is the first result on google when you search for "Redirect from Servlet" I think it's important to have an answer that helps most people, not just the original asker.

提交回复
热议问题