apache tomcat catalina as maven dependency for CORS filter

后端 未结 2 1976
自闭症患者
自闭症患者 2021-02-20 07:45

I\'m using org.apache.catalina.filters.CorsFilter in my webapp. So I specify the maven dependency


    org.apache.tomcat         


        
2条回答
  •  臣服心动
    2021-02-20 08:00

    This worked for me:

            
                org.apache.tomcat
                tomcat-catalina
                7.0.42
                provided
            
    

    Trying 7.0.50 also worked. Can you double-check that there are no competing jar file versions lying around? Perhaps there is an older version without the class actually getting used by the JVM. Under Linux, "ls -l /proc/$CATALINA_PID/fd", may show which jar file is being used.

    Also make sure to run this in a recent enough version of the Tomcat server.

提交回复
热议问题