在login.html或者你的是login.jsp里面 head里面加上如下代码即可解决: <script type="text/javascript"> if (top != window) { top.location.href = window.location.href; } </script>