PrintWriter out = response.getWriter(); out.print("<script> alert('您还没有登录,请登录...'); window.location='***.jsp' </script>"); out.flush(); out.close();