out.print("<script>alert('我跳转成功了!');window.location.href='add.jsp';</script>"); 当然前提的需要你有一个add.jsp的页面