How to use external banks without adding them to the project

Hi In my project I have a lot of cans. Each time I change the code and you upload it to the server, it takes a lot of time, because I add banks to the war for deployment on tomcat. I try to put all the banks on the server, in some folder and load only the rest of the project in order to speed up the cycle. What would be the best way to do this?

I am using tomcat 8.5 for deployment without any build tools. I would like to set the ABSOLUTE path in the classpath, but when doing this on my local computer, it will not work after deployment on the unix server.

I have never seen where or if I can set the absolute path for cans (NOT LOCAL MACHINES)

Thanks in advance

+7
java tomcat
source share
1 answer

You can read about this in the Tomcat docs: Loader HOW-TO Class .

The simplest case and method is to put these commonly used banks in the $CATALINA_BASE/lib dir directory - they will be loaded by the Tomcat class loader.

But it doesn't seem to be a very good practice, as mentioned in the instructions:

Typically, application classes should NOT be posted here.

Personally, in practice, I would ignore this hint and still put the banks in this folder. But if you want to be precise, you can create a separate path on the server (or even inside the CATALINA_BASE folder) and place banks there. After that, you should specify this path in the $CATALINA_BASE/conf/catalina.properties file in the common.loader property:

 common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar" 
+1
source share

All Articles