问题描述
我正在尝试使用tomcat7设置ubuntu服务器,我使用基本安装了tomcat7
I am trying to set up an ubuntu server with tomcat7, I installed tomcat7 using basic
sudo apt-get install tomcat7
在ubuntu中,我在我的应用程序中有一些通用库,例如JSTL和其他内容,因此我想将它们放在网络服务器的include文件夹中。
sudo apt-get install tomcat7
in ubuntu, I have some common libraries across my applications like JSTL and other stuff so i would like to make them in the webserver include folder.
将它们放置在搜索互联网后的服务器中的每个位置,但永不加载,将它们放置在正确的位置在哪里?
I have put them every where in the server after searching the internet but the never get loaded, where is the correct location to put them ?
我已经在Windows中完成了此任务工作很好,但是在ubuntu中它似乎不起作用,还是我应该以其他方式安装tomcat吗?
I've done this in windows and it worked greatly, but in ubuntu it does not seem to work, or should i install tomcat some other way ?
推荐答案
在安装tomcat7之后在Ubuntu软件包中,您可以使用 tomcat-instance-create< dir> 创建自己的tomcat实例。在其他文件中,该命令将创建< dir> /conf/catalina.properties,该文件定义
After installing tomcat7 package in Ubuntu, you create your own instance of tomcat using tomcat-instance-create <dir>. Among other files, that command creates <dir>/conf/catalina.properties, which defines
common.loader = $ {catalina.base } / lib,$ {catalina.base} / lib / *。jar,$ {catalina.home} / lib,$ {catalina.home} / lib / *。jar,$ {catalina.home} / common / classes, $ {catalina.home} / common / *。jar
如果您的jar位于common.loader所指的任何位置,它将在实例中的所有应用程序之间共享。 CATALINA_BASE是您在tomcat-instance-create中指定的< dir>。因此,要在tomcat7软件包更新之间保留公共库,请将它们放入< dir> / lib
If your jar is in any of the places referred to by common.loader, it will be shared among all applications in the instance. CATALINA_BASE is the <dir> you specified in tomcat-instance-create. So, to keep your common libraries between tomcat7 package updates, place them into <dir>/lib
这篇关于如何在ubuntu中的tomcat7安装中添加我的JAR库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!