Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8657105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:26:24+00:00 2026-06-12T15:26:24+00:00

Im building a few JSF interfaces that im going to embedd into a website.

  • 0

Im building a few JSF interfaces that im going to embedd into a website. I want though to allow the user to log into the website inorder to view another JSF interface where they can update details about the services the website will offer.

What I want to know is, do I need to implemented a Login/Registration facility from scratch or is there an existing system already out there that I can easily use. The db im using is a derby db and the application runs on a GF server.

Or can someone recommend some good resources on building a custom user site using JSF?

Sorry if this question has been asked before and I missed it in my searches before.

P

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:26:25+00:00Added an answer on June 12, 2026 at 3:26 pm

    All the textbooks seem to mention container-managed security but I have always stayed away from it. In every application I have done so far I have implemented application-managed authentication, which gives you much more flexibility with regard to how authentication is done. The price of course is you will have to allocate a couple of days to implementing and fiddling with it.

    The key to making it easy is to 1) incorporate the authentication right in your Facelets template that all pages use so you always have it, and 2) have a @SessionScoped bean which holds the state of the user login. In the application I am working on now the top part of the template looks like this:

        <div id="top" class="top" style="min-height: 40px">
    
            <h:form id="formLogout" style="float: right"
                    rendered="#{userSession.loggedIn}">
                <h:outputText
                    value="Logged In As: #{userSession.sysUser.handle} "
                    rendered="#{userSession.loggedIn}" />
                <p:commandLink value="Logout"
                               ajax="false"
                               action="#{userSession.logoutUser}" />
            </h:form>
            <h:panelGrid style="float: right" rendered="#{!userSession.loggedIn}" >
                <h:form id="formLogin">
                    <h:outputLabel value="User Handle: " />
                    <p:inputText size="16" value="#{userSession.loginHandle}" />
                    <h:outputLabel value=" Password: " />
                    <p:password value="#{userSession.loginPassword}" />
                    <p:commandButton value="Login"
                                     ajax="false"
                                     action="#{userSession.login}" />
                    <h:link outcome="/newUser" value=" New User" />
                    <h:commandLink action="#{userSession.loginAlan}" value="A" />
                </h:form>
            </h:panelGrid>
    
            <h:link outcome="/index" value="MyWebApp v#{wisApp.ver}" />
            <h:outputText value=" " />
        </div>
    

    I’ll not bore you with the UserSession bean since it should be pretty obvious. The sysUser property is actually a JPA entity fetched from the Derby data base.

    (Note the extra h:commandLink value=”A”. That’s a link that automatically logs me in so I don’t have to type my username and password over and over again while developing.)

    That should probably be what you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The website I'm building has a few elements that are the same on every
I'm building a website that has a subscription functionality and I have a few
Currently I'm building a few mobile apps (currently on iOS but later on Android)that
I'm building a few SharePoint sites, and I want to make use of zones
I am building a simple application that has a few buttons that when clicked
I'm building my first website with rails,it consists of a blog, a few static
I have a few different scales that I'm building a VB app for. Is
I'm building a site that runs fine for a few hours, but then *.asmx
I'm building an iframe app that will have a few mentions of the Facebook
I'm building an app (in Qt) that includes a few graphs in it which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.