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的整页代码
添加回答
举报
0/150
提交
取消