How to implement j_security_check with Primefaces? Normally in JSP if you want to use JAAS for login, the login form generally is:
<form action="j_security_check" method="POST">
Username:<input type="text" name="j_username"><br>
Password:<input type="password" name="j_password">
<input type="submit" value="Login">
</form>
But how do we implement it in JSF or in Primefaces!
- What will be the action
- How do we get rid of id or name like
formId:componentId
- Also the
p:commandButton
is ajaxified in Primefaces by default, so how does it submit the form in non-ajax way
I had a requirement to implement the JAAS form authentication with Primefaces and I am sharing the solution here; it might come handy to someone.