Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Standard Authentication in JSF  RSS feed

 
annaunivStud Sboa
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i have a basic doubt of what is stanard authentication in JSF...
well i use jsf and sdo...i use data objects and check whether username exists....
i dont know what is standard authentication??
how do i do that in JSF RAD....???
how do i protect the pages based on Roles....
(i can see options for roles in web.xml in RAD) but i am not in a position to use it...
please help me to understand


thanks...
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"annaunivStud Sboa",

We don't have many rules here at the JavaRanch, but one we do insist on is that you use a Real Name, not a "handle" or alias. See this link: http://www.javaranch.com/name.jsp for more information.

First, if you depending on an IDE to do all your work, you'll never really understand what you're doing. There is plenty of documentation on how to set up and use standard (container-based) authentication, but most of it is on how to set up and use authentication, not on how to get RAD to do it for you.

For the short answer, however, the web.xml doesn't actually protect "pages", it protects URLs. You define URL patterns in web.xml and assign them to security roles. The application container (server) then checks incoming URLs and determines if the user fits into one or more of the allowable roles. It also diverts the request to login, if the user isn't logged in yet.

Roles can also be tested on the JSF page itself and in Java code. For information on how to do this, I recommend reading the Sun JEE documentation.
 
annaunivStud Sboa
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks for reply
for the display name i did give my name in all possible formats...
but it dint accept saying name already existing.... i could not do anything with that....

well can you suggest me some tutorials for redirecting the users if not logged in and using web.xml for security features...

i am in need of it very badly... thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!