0

After I add the following into web.xml to support spring security 3. the spring ioc + struts2 not work, when struts2 point to a bean, system can not search the bean definition in applicationContext.xml, it just shows me Class Not Defined

<context-param>
     <!-- Defines definition file for security setting. -->
     <param-name>contextConfigLocation</param-name>
     <param-value>classpath:app-security.xml</param-value>
    </context-param>

    <!-- Bootstraps the Spring root web application context before servlet initialization -->
    <!-- The following code defines filter for Spring Security -->
    <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <filter>
         <filter-name>springSecurityFilterChain</filter-name>
         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
         <filter-name>springSecurityFilterChain</filter-name>
         <url-pattern>/*</url-pattern>
    </filter-mapping>

Please help! thanks in advance !

lschin
  • 6,745
  • 2
  • 38
  • 52
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133

1 Answers1

0

Sounds like you forgot to add some JARs that are needed. Make sure that you (and the classloader) can find the class that it says is missing. (Hint: It's probably one of the Spring security JARs.)

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • but if I remove those configuration in web.xml, everything works well.So it won't be the problem of jar missing – MemoryLeak May 12 '11 at 12:37
  • can you list the spring* jars on your classpath? are you using any kind of a dependency management system? (eg Maven/Ivy) – abalogh May 12 '11 at 12:46
  • No, we just include all *.jar in build path, if it's the jar's problem, then once i remove the configuration in web.xml, it should not work, right ? but actually it works! – MemoryLeak May 12 '11 at 12:49