I found examples of programmatic login into jsf based application, like this from Balusc.
Maybe it is silly question but, when I use form based authentication, I can use only a simple html form with
<input id="username" type="text" name="j_username" />
<input id="password" type="password" name="j_password"/>
in <form method="post" action="j_security_check"> form.
I cannot use jsf form from example, why?
Because it’s not JSF who handles the login, it’s the container itself. The JSF
<h:form>does not allow you to specify a specific action URL. So you have to use<form>.But your question title is confusing. Using a
j_security_checkform is not “programmatic login”. It’s “container managed login”. The real programmatic login way is callingHttpServletRequest#login()yourself. You can do this in a JSF managed bean action method which is invoked by a JSF<h:form>.