转发
request.setAttribute("message",message);
//request.setAttribute("path",analyPath);
//转发传值:"/myImportDataServlet.do?path="+analyPath
request.getRequestDispatcher("/myImportDataServlet.do?path="+analyPath).forward(request, response);
//重定向传值
request.getSession().setAttribute("path", analyPath);
//重定向界面“importData” 项目请求配置path 路径
response.sendRedirect("/importData/myImportDataServlet.do");
另一个Servlet 获取值
//获取转发的值
String path=request.getParameter("path");
//获取重定向的值
String path=(String) request.getSession().getAttribute("path");