Jsf 在服务器启动期间,Tomcat服务器找不到此Spring ContextLoaderListener类

Jsf 在服务器启动期间,Tomcat服务器找不到此Spring ContextLoaderListener类,jsf,tomcat,spring-security,Jsf,Tomcat,Spring Security,错误是: INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored. mai 14, 2013 11:19:50 AM org.apache.catalina.core.StandardContext listenerStart SEVER

错误是:

INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
mai 14, 2013 11:19:50 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.springframework.web.context.ContextLoaderListener
我尝试了本教程,但没有结果。 我用

  • tomcat 7.0
  • JSF2.0
  • spring security 3.0.6
web.xml

    <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>plateformHotlin</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
  <context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>redmond</param-value>
  </context-param>

  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
 <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.xhtml</url-pattern>
   </servlet-mapping>
  <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
   </servlet-mapping> 
   <welcome-file-list>
        <welcome-file>/index.xhtml</welcome-file>
    </welcome-file-list>

    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
<!-- ////////////////////////// END: FACES RELATED ///////////////////////// -->

<!-- ========================== SPRING RELATED ============================= -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
         /WEB-INF/security-app-context.xml
         /WEB-INF/applicationContext.xml

        </param-value>
    </context-param>
    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>
    <listener>
        <listener-class>
            org.springframework.web.context.request.RequestContextListener
        </listener-class>
    </listener>
    <!-- Spring Security -->
    <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>  
        <dispatcher>REQUEST</dispatcher>  
        <dispatcher>FORWARD</dispatcher>  
    </filter-mapping> 

    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/j_spring_security_logout</url-pattern>
    </filter-mapping>
<!-- ////////////////////////// END: SPRING RELATED //////////////////////// -->
</web-app>

平台霍特林酒店
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
index.jsp
主题
雷德蒙
Facesservlet
javax.faces.webapp.FacesServlet
1.
Facesservlet
*.xhtml
Facesservlet
*.jsf
/index.xhtml
30
上下文配置位置
/WEB-INF/security-app-context.xml
/WEB-INF/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.request.RequestContextListener
springSecurityFilterChain
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChain
/*  
要求
向前地
springSecurityFilterChain
/j_-spring_-security_-logout

请将web.xml添加到问题中在您的定义中,您需要用逗号分隔xml文件,如下所示:/web-INF/security-app-context.xml,/web-INF/applicationContext.xml