To deploy these JARs, it is recommended to place them inside one or more AMP files, and deploy them into the share.war file.
As mentioned previously, installing these JARs directly into the exploded webapp directory structure is not recommended as application servers can overwrite your changes at unpredictable times.
While it is possible to avoid the overwriting problem (at least in Tomcat) by placing these JAR files in tomcat/shared/lib (that is, outside of the web application directory structure itself), this is also not recommended for final deployment as this causes the JARs to be included on the classpath of every web application installed in that Tomcat server (typically this means at least the Share webapp and the Alfresco repository webapp). In fact, since v6.0, Tomcat no longer provides a shared/lib directory by default, specifically because it is so problematic from a webapp isolation perspective. However, this can be changed by using the conf/catalina.properties file.