This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
First of all my apologies if my issue has already answered, but I haven't been able to find an answer.
I need to authenticate users from a LDAP server (I already did this using JNDI realm) and load roles from a sql server database, the problem that I am having is that roles on the ActionMapping class are set when the context is loaded and they are null since LDAP does not have the roles, so if I do HttpServletRequest.isUserInRole(), that call returns false. I was thinking on extending the JNDI realm, but I've got the feeling that's no the right path, I am looking into using JAAS realm and write a custom login that will call the JNDI class and write a custom getRoles that will call the db and do a load of the roles table, but I not sure if that is feasible.