1: request.getRequestDispatcher("/other/page.html?para=some").forward(ServletRequest, ServletResponse);
用于将请求在服务器端重定向至另一个页面,它会保留request里面的参数、状态等,而且客户端并不知道请求被重定向。
2: response.sendRedirect(request.getContextPath() + "/index.html");
用于告诉客户端重新发送请求至新的页面,两次请求独立,除了能在url上挂参数外,由于是两次独立请求,request和response也是独立的