//地址栏不变,只能访问项目内的 //String forward = "/Jsp/abc.jsp"; //RequestDispatcher rd = req.getRequestDispatcher("/Jsp/abc.jsp"); //rd.forward(req, resp); resp.sendRedirect(req.getContextPath()+"/Jsp/abc.jsp");//地址栏变 可以访问项目外的
时间: 2024-11-01 15:23:12
//地址栏不变,只能访问项目内的 //String forward = "/Jsp/abc.jsp"; //RequestDispatcher rd = req.getRequestDispatcher("/Jsp/abc.jsp"); //rd.forward(req, resp); resp.sendRedirect(req.getContextPath()+"/Jsp/abc.jsp");//地址栏变 可以访问项目外的