Hi,
there is a getUserPrincipal() method in ExternalContext,
Regards
Volker weber
Jeffrey Porter wrote:
Hello again.
My question is this.
I want when a JSF page is displayed, to look up the current user and
display some information on them.
For example…
*%*
Title: Message
We
have a managed bean representing the user with session scope that is filled out
when the user successfully logs in by the managed bean responsible for
login. Any page then has access to the user's
information.
Our
managed bean responsible for the login process has a
Alexander (KBSA 21)
[mailto:[EMAIL PROTECTED]
Sent: 20 October 2005 15:04
To: MyFaces Discussion
Subject: RE: User Management - advice needed.
Add a user-info-bean when
a) the session is created (Session-listener)
b) the user-credentials are created (by JAAS?)
and just display them from within
.
-Original Message-
From: CONNER, BRENDAN (SBCSI)
[mailto:[EMAIL PROTECTED]
Sent: 20 October 2005 15:07
To: MyFaces Discussion
Subject: RE: User Management -
advice needed.
We have
a managed bean representing the user with session scope that is filled out when
the user successfully logs
so how do you control the authorization?
do you insert a check into every single page?
or via phaseListener, navigationHandler, etc.?
CONNER, BRENDAN (SBCSI) wrote:
We have a managed bean representing the user with session scope that is
filled out when the user successfully logs in by the
You can do
FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal()
in every bean, also at first page.
Jeffrey Porter wrote:
I've messed about and got my action method to make a call to a
SessionBean.
Which then looks up the current user via the SessionContext.
The
In my last project I used a servlet filter for this case... worked
exceptionally well.
Marius Kreis wrote:
so how do you control the authorization?
do you insert a check into every single page?
or via phaseListener, navigationHandler, etc.?
PROTECTED]
Sent: 20 October 2005 15:45
To: MyFaces Discussion
Subject: Re: User Management - advice needed.
You can do
FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(
)
in every bean, also at first page.
Jeffrey Porter wrote:
I've messed about and got my action method
PROTECTED]]Sent: 20 October 2005 15:45To: MyFaces DiscussionSubject: Re: User Management - advice needed.
You can doFacesContext.getCurrentInstance().getExternalContext().getUserPrincipal()in every bean, also at first page.Jeffrey Porter wrote: I've messed about and got my action method to make a call
9 matches
Mail list logo