Prevent the system to be got access without login

来源:互联网 发布:6080软件下载 编辑:程序博客网 时间:2024/03/29 23:19

Write in the Head of JSP


<pre name="code" class="html">     <%      System.out.println(session.getAttribute("Name"));     if(session.getAttribute("Name")==null){               response.sendRedirect("main.jsp");     }     %>


0 0
原创粉丝点击