title: How can I get the logged-in user's username using JDBCRealm?
body: <p>I'm running Glassfish 3.0 and I'm implementing JDBCRealm for login authentication. The username and roles are saved in a table called usertable. The authentication is working as expected. </p>
  
  <p>But the problem is now when the user logs in, how can I retrieve the username of the logged in user in the application?</p>
  
  <p>PS: I'm implementing JSF page and Managed Bean</p>