假设我们在“webapps”文件夹下有两个 Web 应用程序;“abc”和“xyz”。有没有办法为每个应用程序定义不同的类路径文件夹?在 Tomcat 中,类似“abc.classpath=Directory_A; xyz.classpath=Directory_B”的东西会更好。
提前致谢...
Your applications will all load the TOMCAT_HOME/lib contents. Other than that each of your webapps will load whatever's in their own WEB-INF/lib & WEB-INF/classes folders.
我找到了一个方法...
我爆炸的 Web 应用程序的名称是“abc”。我创建了“$CATALINA_BASE/conf/Catalina/localhost/abc.xml”文件并定义了
<Context className="org.apache.catalina.core.StandardContext">
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="/externalClasspath/*.jar"/>
</Context>
关于这个问题有什么想法吗?因为它没有用。