Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSF and the fly likes isUserInRole always returns false Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "isUserInRole always returns false" Watch "isUserInRole always returns false" New topic

isUserInRole always returns false

Krishnappan Subramanian

Joined: Jul 09, 2008
Posts: 2
i have my web.xml setup ... the below code is what i am using for rendering .... but it always returns false .... any idea? please help asap....thanks

HttpServletRequest httpServletRequest =(HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
validUser=httpServletRequest.isUserInRole("ADMIN USER");
return validUser;
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41599
Is the user ever asked for username and password? If so, when and how?

Ping & DNS - my free Android networking tools app
Krishnappan Subramanian

Joined: Jul 09, 2008
Posts: 2
the user is authenticated via LDAP security ...
I agree. Here's the link:
subject: isUserInRole always returns false