Add some code to the servlet
out.print("<script>alert('添加成功!');window.location='index.jsp';</script>");