I think the best practices are to keep libraries in the war, because if you update the library that you shared, you will be sure that it is compatible with all of your applications that use it. We do this with grails and spring in general, so we donβt have to go back and do compatibility testing every time we update.
I also believe that tomcat loads an instance of the class for each application, so you do not store it in memory, using it as a general class.
See also:
Does Tomcat run the same library file into memory twice if they are in two web applications?
Tripwired
source share