Control the classpath ordering of jars in WEB-INF/lib on Tomcat 5?

后端 未结 7 826
终归单人心
终归单人心 2020-12-10 05:48

I have a legacy web app running in Tomcat 5.0.

This web app has two jars in WEB-INF/lib, let\'s say Foo-2.0.jar and Bar-2.0.jar

7条回答
  •  攒了一身酷
    2020-12-10 06:45

    To have Foo-2.0.jar before Bar-2.0.jar, update the Bar-2.0.jar with the content of Foo-2.0.jar (overwrite already contained .class)and delete Foo-2.0.jar from the war.

    -cp A.jar:B.jar has the effect, that content of A.jar is like a layer over B.jar. So you get the same effect with overwriting B.jar's content with A.jar's.

提交回复
热议问题