httpsession « Session « JSF Q&A





1. JSF logout using session.invalidate does not clear the current username?    stackoverflow.com

In my JSF application, I get the name of the currently signed in user like this ...

public String getLoggedInUsername() {
  return FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();
}
... and I check if the user is signed ...

2. HttpSession - how to get the session.setAttribute?    stackoverflow.com

I'm creating HttpSession container this way:

@SessionScoped
@ManagedBean(name="userManager")
public class UserManager extends Tools
{
  /* [private variables] */
  ...
  public String login() 
  {
    /* [find user] */
 ...