Can I create a custom classpath on a per application basis in Tomcat

前端 未结 4 1355
粉色の甜心
粉色の甜心 2020-11-30 00:16

For some applications I use ZK, others Hibernate, other Apache Commons, etc.

I don\'t want to deploy a 75MB war file, just because it uses lots of libraries.

4条回答
  •  醉梦人生
    2020-11-30 00:22

    From Tomcat 7 there is no mention of not being able to use the VirtualWebappLoader in production. I tried it and it works like a dream. Simply add the following to META-INF/context.xml:

    
    
    
        
    
    

    In Netbeans, under packaging, I just untick all the packages, taking the .war size down to nothing, make sure the dependencies are in the correct folders on the server and upload. Yey! No more 100 MB WAR file.

提交回复
热议问题