servlet提交后弹出提示框并页面跳转
PrintWriter out = response.getWriter();
out.print("<script>alert('数据添加成功');location.href='/JFreeChartTest/upload_file.jsp'</script>");
如果前台弹出的提示框中显示的是????,需添加response.setContentType( "text/html;charset=GBK ");
即: response.setContentType( "text/html;charset=GBK ");
PrintWriter out = response.getWriter();
out.print("<script>alert('数据添加成功');location.href='/JFreeChartTest/upload_file.jsp'</script>");