title: Check whether the user is already logged in or not
body: <p>I am currently working on a web application developed on Servlet-JSP MVC which runs on a internal server and the problem scenario is as below.</p>
  
  <p>If the end user enter the site url,the application will ask for login credentials and i am checking the credentials in a LoginController.</p>
  
  <p>Consider the situation when the user enter the credentials and login into the application and then closes the browser window,if the user again types the url it will again ask for the login credentials.</p>
  
  <p>Now i want my application to remember whether a user is logged in or not,only ask for the login credentials if the user is already not logged in.</p>
  
  <p>How can i implement this?Any suggestions on what can be done will be helpful.</p>
  
  <p>Thanks in advance,</p>