[jboss-user] [Security & JAAS/JBoss] - Re: Know current login user in my bean

jaikiran do-not-reply at jboss.com
Thu Sep 28 03:14:03 EDT 2006


I havent worked with JSF, but how about this API:

http://java.sun.com/javaee/javaserverfaces/1.0/docs/api/javax/faces/context/ExternalContext.html#getRemoteUser()

So your code will look like:

FacesContext fc = FacesContext.getCurrentInstance();
  | String loggedInUsername = fc.getExternalContext().getRemoteUser();

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974769#3974769

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974769



More information about the jboss-user mailing list