Question

Not able find out steps to Integrate Spring security ldap authentication in struts 1.1 application.

Was it helpful?

Solution

Please follow the below steps:

  1. Add the spring.jar into your project
  2. In the web.xml file, add the following piece of code

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/acegi-security-config.xml
    </param-value>
    </context-param>
    
    
    <!-- Spring Security Filter -->
    
    <filter>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetClass</param-name>
    <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
    </init-param>
    </filter>
    
    <filter-mapping>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
    <filter-name>AuthenticatedFilter</filter-name>
    <filter-class>com.security.AuthenticatedFilter</filter-class>
    </filter>
    
    <filter-mapping>
    <filter-name>AuthenticatedFilter</filter-name>
    <servlet-name>action</servlet-name>
    </filter-mapping>
    
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    

acegi-security-config.xml, is the spring security configuration file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top