@How do you do ? I hoppe well.
First of all I wanted to wish all users of this nice forum a happy new year!
I recently developp a webapp wiht security constraints settings. As you perhaps now it, it work with j_security_check on the
action-value of the form. The form hat two folders: a login-folder and a password-folder like use by j_security_check. That means
as names: j_username and j_paswword.
Now I want to get the loggin name of the logged user (on success). for some work on the next page
But I allway got NULL on the string variable login !!!
Try to use in your next page (where you want to retrieve the user name) bellow code (if you use for example jsp):
<%= request.getUserPrincipal().getName() %>
This will retrieve the username that user inserted into the j_username field of login page.