Option 1
If you use the code (and this is a large piece of code that drives you crazy when loading military files), it may be possible to create a jar containing the code and add the jar file to the tomcats library folder, which equals
$ {CATALINA_BASE} / lib / Please note that this is usually not what you want to do easily, because this jar file will be available for ALL military files on tomcat, creating possible namespace problems.
Option 2
If sharing code with all projects on the application server is not an option, you will have to add the jar file to the projects and add it to its class path (which happens automatically in the eclipse if you add the jar to
$ {PROJECT_ROOT} / WebContent / WEB-INF / lib )
Accordingly, this does not really matter, since tomcat will load class files that are not very large. There may be instances, but the type of deployment does not really affect instances.
source share