Get the user info from a jsp
I have a jsp login page (FORM authentication) that when the user logon forward to home jsp page. Here I need to get the user info.
Now I'm using this, but it doesn't works:
String user = request.getUserPrincipal().getName();
if (request.isUserInRole( "xxxx" )) .........
Coul you please write me the right code to use and the library to import? Thanks a lot.