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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:26:49+00:00 2026-06-05T10:26:49+00:00

The standard tutorials for J2EE 6 show the handling of user authentication as follows:

  • 0

The standard tutorials for J2EE 6 show the handling of user authentication as follows:

<form method="POST" action="j_security_check">
    <table cellpadding="0" cellspacing="0" border="0">
         <tr>
            <td align="right">Username:&nbsp;</td>
            <td>
                <input type="text" name="j_username">
             </td>
         </tr>
         <tr>
             <td align="right">Password:&nbsp;</td>
             <td>
                <input type="password" name="j_password">
             </td>
         </tr>
         <tr>
             <td></td>
             <td>
                 <input type="submit" value="Login">
             </td>
        </tr>
    </table>
</form>

The approach uses the special container function “j_security_check” with special fields “j_username” and “j_password”.

* Would this be possible to do in JSF 2.0 ?
* Are the j_username/j_password fields available after successful authentication? More precisely, how do I identify the user after they have authenticated?

Any simple, example code snippets would be much appreciated.

  • 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-05T10:26:53+00:00Added an answer on June 5, 2026 at 10:26 am

    Would this be possible to do in JSF 2.0 ?

    Yes. It’s after all just a bunch of HTML and the container is the one who’s doing the authentication, not JSF itself. An alternative is programmatic login by HttpServletRequest#login(). This allows you to use a fullworthy JSF form with JSF based validation, ajax fanciness and all on em. See also this answer for a kickoff example: Does JSF support form based security


    Are the j_username/j_password fields available after successful authentication? More precisely, how do I identify the user after they have authenticated?

    Only the username is in JSF context available by ExternalContext#getRemoteUser() and in views by #{request.remoteUser}. The password is not available for obvious security reasons.

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

Sidebar

Related Questions

The standard way of creating URLs in grails is: <a href=${createLink(controller:'news', action: 'show', params:
I'm trying to get the standard error messages to show up in zend_form but
A have to customize standard ListView control in my application. I viewed video tutorials
Standard Fancybox places an overlay on the entire body. Is there a way in
Standard Java does not offer an object implementing the Queue interface on top of
Standard Entry Sequence : _function: push ebp ;store the old base pointer mov ebp,
standard power operation ( ** ) in Python does not work for negative power!
The standard specifies (23.4.4.2:5, etc.) that constructing all four ordered associative containers ( map
The standard data source configuration in JBoss requires the username and password of the
In standard SQL, is there a way to say: select mubmle as x from

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.