1.js
/*解决iframe框架session失效时跳不出去*/
if (window != top) {
top.location.href = location.href;
}
2.Java中使用js
response.setCharacterEncoding("gbk");
PrintWriter out = response.getWriter();
out.print("<script>top.location.reload();</script>");
out.flush();
out.close();