Implemented the authorization using JDBCRealm. The username and password entered at login.jsp
<form action="j_security_check" method="POST">
<br / >
Username:<input type="email" name="j_username">
Password:<input type="password" name="j_password">
<input type="submit" value="Login">
After login go to the main page.xhtml.
I display the username of a registered user obtained, but how to save in the variable as?
Probably a stupid question, but because of this problem, can't move on :(