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 8870533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:45:26+00:00 2026-06-14T17:45:26+00:00

I use container managed security in my JSF app so I have a login

  • 0

I use container managed security in my JSF app so I have a login page
with below default setup.

Now in the login page, I wanted to add a button beside the login button to allow
the user to register.

But how do I forward it to my register.xhtml page from my register button? I tried it with this code:

<form method="post" action="j_security_check">
    <div id="login-content">
        <p>Login to access secure pages:</p>
        <p:panelGrid columns="2">
            <h:outputLabel for="j_username" value="Username" />
            <input type="text" name="j_username" id="j_username" />

            <h:outputLabel for="j_password" value="Password" />
            <input type="password" name="j_password" id="j_password" />

            <f:facet name="footer">
                <input type="submit" name="submit" value="Login" />
                <input type="button" name="register" 
                    value="#{request.contextPath}/pages/public/register.xhtml" />
            </f:facet>
        </p:panelGrid>
    </div>
</form>

I tried changing also the form to h:form so that I could use the p:commandButton but as I notice,
my login page is not working and nothing is happening when I click the submit button.

How to achieve what I want to do?

  • 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-14T17:45:27+00:00Added an answer on June 14, 2026 at 5:45 pm

    Just use <h:button> or <p:button> to create a GET button.

    <h:button value="register" outcome="/pages/public/register.xhtml" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use application managed security for an Intranet web application. I have the next
I was able to setup Glassfish container managed security following this http://jugojava.blogspot.com/2011/02/jdbc-security-realm-with-glassfish-and.html Now, all
i have a div that i use as a container to fit in footer
I want to use container managed transaction in one class and share it with
I have a bunch of java custom tags that use spring managed beans.. since
I'm trying to set a container managerd security a realm for my web app
If an application is managed by the Spring container, can a developer still use
So I'm using container managed transactions in OpenEJB and Hibernate and I have a
I have a Java EE 6 web application using container-managed transactions and container-propagated Persistence
I have got stuck at creating usefull form login in SpringMVC using Spring Security.

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.