Author: Wang Zhiwei <% String studentID = (String) session.getAttribute ( "userName"); // here studentID value is first stored in the session after a successful login at the login page // into session if (studentID == null ) // If the value is empty {response.sendredirect ("stuloginingin.jsp"); // Jump to the login page}%>