response.sendRedirect 不跳转

public void doGet(HttpServletRequest request, HttpServletResponse response) throws  IOException, ServletException {

PrintWriter writer = response.getWriter();

String userName = request.getParameter("user");

String passWord = request.getParameter("password");

Map MysqlTest1 = new MysqlTest().getMap();

//RequestDispatcher rd = request.getRequestDispatcher("mainContent.jsp");

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

System.out.println(path);

System.out.println(basePath);

response.sendRedirect(path+"/mainContent.jsp");

前台返回mainContent.jsp的整页代码

qq_我的_11112
浏览 2207回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP