在页面上添加以下语句
<script>
<c:if test="${currentAccount == null}">
window.location.href = path+"/index/login";
</c:if>
</script>
本人遇到的坑:
一开始使用的方法是:
<c:if test="${currentAccount == null}">
<%response.sendRedirect(path+"/index/login");%>
</c:if>
但是跳转的登录页面是嵌套到框架右边的内容栏,并不是想要的