title: Avoid login in a java web app using cookies
body: <p>I'm creating a simple Java webapp using Tomcat 7. In this site only logged users can view the content, so I have a main page <strong>index.jsp</strong> which contains only 2 forms, one to log-in and other to sing-up. Only once the user has logged-in or registered, he can access the website content.</p>
  
  <p>I'd like to avoid users to enter username and password each time, so I think I could use cookies to achieve this, right?</p>
  
  <p>If it's right, I'd like to know how to do it... my first approach is to use a servlet, and use the url of this servlet as the entry point of my webapp, but I'm not sure that this is the best practice at all...</p>
  
  <p>And anyway, if finally it is a good practice, can I set this url as the default entry point or something like that?</p>