Hi thank you for reading my post is there any standard way to set and get role/username from session ? for example should i use my own defined variable for role and user name or JSF provides an standard way for setting and getting user name and its role ?
Hi!Raminaa, It's the same as you do for Struts. After all JSF does not have any in-built security features apart from Container managed security or a custom implementation of JAAS. Anyway, it is the j_userName, and j_passWord for the user name and password fields(components in JSF world),and you can check for authorization by calling isUserinRole() method , and get a list of users bucalling gerUserPrincipals() method as you would have done in Struts.There is not much difference between JSF security and Struts security. Infact, lately Mr.Frank Nimphius and Duncan Millis of Oracle Corp, have contributed some piece to this workpart of the frame, which you may have a look at on the following URL: