This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getCallerPrincipal in Managed Bean

 
Pasquale Imbemba
Greenhorn
Posts: 5
Eclipse IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

in EJB I can use getCallerPrincipal() from javax.ejb.SessionContext; I wonder how to get this information when I just use JSF, i.e. from within a Managed Bean only?

I appreciate any help.

Thanks,
~pi4630

 
Pasquale Imbemba
Greenhorn
Posts: 5
Eclipse IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will do the trick:

 
Tim Holloway
Saloon Keeper
Pie
Posts: 17628
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually put this kind of code in a special "JSFUtils" class in order to keep the bulk of the code framework-independent. But yes, that's the function you need.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic