try {
this.getResponse().setContentType("text/html; charset=UTF-8"); //转码
PrintWriter out = this.getResponse().getWriter();//该方法会覆盖当前请求的页面
out.flush();
out.println("<script>");
out.println("alert('开始时间与结束时间不得为空!');");
out.println("history.back();");
out.println("</script>");
return;
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}