I am bit fresher to Spring-Security/LDAP. Here I am try to connect to my company's Active directory server through Spring Security, but I am getting null for ldapTemplate in my TaxUserAuthenticate class which mean I am not able to connect to AD. Please find the below code. I am sure there must be problem in my configuration file however I am not able to figure out the problem. I have writen the below piece of code in /WEB-INF/tax-servlet.xml which used for my Spring MVC web application.