HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("text/html;charset=UTF-8");
response.setCharacterEncoding("UTF-8");//防止弹出的信息出现乱码
PrintWriter out = null;
try {
out = response.getWriter();
out.print("<script>alert(‘抱歉,您的链接已失效,您可以返回首页重新申请‘)</script>");
out.print("<script>window.location.href=‘/index.action‘</script>");
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
return null;
本文出自 “艺晨光的博客” 博客,请务必保留此出处http://ycgit.blog.51cto.com/8590215/1621392
原文地址:http://ycgit.blog.51cto.com/8590215/1621392