HTTP状态500 - org.apache.jasper.JasperException:在第125行

时间:2016-06-04 13:36:51

标签: java spring jsp

在我的春季项目中,我想重定向到登录页面,用户不是重定向,我是春天的新手,我没有使用spring security,因为我使用了response.sendRedirect()函数进行重定向,但它不能正常工作我的代码如下。

<%
if (session.getAttribute("userRole")!= "Admin")
{
  response.sendRedirect("/login.html");

}
%>
在标题中

但是我收到了错误 HTTP状态500 - org.apache.jasper.JasperException:在第125行处理JSP页面/WEB-INF/views/SuperAdmin/header.jsp时发生异常

在第125行中我有侧栏的另一个条件

    <%  
     if (session.getAttribute("new_school_id")==null)
     { 
    %>
    <jsp:include page="sidebar_new.jsp" />
   <% 
    }else{ %>
    <jsp:include page="sidebar.jsp" />
    <% }%>

0 个答案:

没有答案