Load external library in java web application

后端 未结 1 1750
执念已碎
执念已碎 2021-01-03 03:37

My scenario is the following:

I have a WebApp.war that is deployed to a servlet container. This WebApp.war contains in WEB-INF/lib the following libraries:

1条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-03 03:50

    Since you are using Tomcat, you could leverage the VirtualWebappLoader.

    Add a META-INF/context.xml whith

    
    
        
    
    

    Remember also that the virtualClasspath attribute must be a absolute path, as correctly stated in the comment below.

    0 讨论(0)
提交回复
热议问题