Tomcat - won't load my META-INF\services\javax.servlet.ServletContainerInitializer file?

后端 未结 4 1554
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-02 07:32

I have a web project that has a \\META-INF\\services\\javax.servlet.ServletContainerInitializer file with its content pointing to the fully qualified name of a

4条回答
  •  一向
    一向 (楼主)
    2021-01-02 08:07

    Well, I think that you'll need to wrap your initializer class (and it's services-related META-INF directory) into a separate *.jar and put it in the WEB-INF/lib.

    This is a JAR service, so I guess it could have something to do with problems with discovering services in a *.war file. Moreover, it doesn't even help if you put your META-INF directory inside WEB-INF/classes and set unpackWAR=false in your Tomcat's server.xml.

    HTH.

提交回复
热议问题