Zero Trust Security in Enterprise Java: What it is and How to Implement it
Cybersecurity isn’t just about building walls, fortresses, moats or any other external barrier anymore. Nowadays, it’s important to check […]
Watch this video to learn how to create a secure web application using multiple Java EE/Jakarta EE APIs and connect it to a MySQL 8 database in this comprehensive tutorial.
Share:
Cybersecurity isn’t just about building walls, fortresses, moats or any other external barrier anymore. Nowadays, it’s important to check […]
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
If your Java EE 8 applications run on Red Hat JBoss Enterprise Application Platform (EAP) 7, you can’t afford […]
Hello.
It was a very interesting video!
I would like to learn more,
Can I download the source code?
Hello 隆 川場,
The source code of the complete application is available here: https://github.com/fturizo/SecureWebApplication
Hello Fabio,
I’ve learned a lot with this video tutorial. The login works perfect and I’ve been able to deploy the project with Netbeans and Payara.
Just a question. The code
public boolean isAllowedToSeeUsers(){
return securityContext.isCallerInRole(“admin”);
}
Always returns false. Do you know how to fix it?
Thanks by this super tutorial
Ivan
Add the declaration of the roles in web.xml and it should work then.
For example
Administrator
admin
Ivan, if the call to securityContext.isCallerInRole(“admin”) always returns false, you must review the configuration of the security constraints in the web.xml to make sure that the JSF pages are properly protected. Make sure that the URL patterns match the corresponding ‘app’ prefix
Hi Fabio,
Thank you very much for your help in this tutorial.
I just have one problem currently when I try login with incorrect details I get the following error. My code is the same of your.
javax.el.ELException: Expression cannot be null
…
JSF1073: javax.faces.FacesException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=, Message=Expression cannot be null|#]
I can’t seem to fix this issue, I would be very greatful if you could point out where I might have gone wrong.
Kind regards,
T