title: Basic Security in JSF
body: <p>I would like to see a simple Login Application, not as simple as <a href="http://www.roseindia.net/jsf/JSFLoginApplication.shtml" rel="noreferrer">this</a> though.</p>
  
  <p>What I would like to achieve is an understanding on how JSF works, I've developed a lot of ASP.NET where you have the code behind and where you can just check if a session was created upon Login.</p>
  
  <p>A similar solution in JSF would be great.</p>
  
  <p>This is basically what I want to achieve:</p>
  
  <ul>
  <li>Login page</li>
  <li>IF OK
  
  <ul>
  <li>Create session and return "success"</li>
  </ul></li>
  <li>IF FAIL
  
  <ul>
  <li>return "failure"</li>
  </ul></li>
  </ul>
  
  <p>(The "success" and failure are mapped to faces-config.xml)</p>
  
  <p>At the success-page I want to be <strong>Certain</strong> that the user is logged in, so one should Not be able to navigate to "success.jspx" if you have not got the correct session.</p>