[英]In which classpath should .jar of mysql-connector-java-5.1.38 be included
I have no idea as to where to include the .jar file of mysql-connector/j using tomcat8.0.33. 我不知道在哪里使用tomcat8.0.33包含mysql-connector / j的.jar文件。 One of the blogs have mentioned to include in $CATALINA_HOME/common/lib, but i am not able to find "common".
其中一个博客提到要包含在$ CATALINA_HOME / common / lib中,但我找不到“ common”。 And also could anyone please tell me how to create context configuration file for tomcat.
也有人可以告诉我如何为tomcat创建上下文配置文件。
In the $CATALINA_HOME/conf, examine the catalina.properties file. 在$ CATALINA_HOME / conf中,检查catalina.properties文件。 There are definitions for where it will look for .jar files.
对于将在何处查找.jar文件有一些定义。
You can make the directory $CATALINA_HOME/common/lib, but it also must be loaded in one of the loaders defined in that .properties file. 您可以使目录$ CATALINA_HOME / common / lib,但也必须将其加载到该.properties文件中定义的加载器之一中。 We actually make the common/lib, and modify the .properties, but there are differences of opinion on that approach.
我们实际上制作了common / lib,并修改了.properties,但是在该方法上存在意见分歧。
You should also be aware of some differences in the loading because of the class loaders that are used by the different defined loaders. 您还应该注意加载的一些差异,因为不同的已定义加载器使用了类加载器。
I believe you are safe (in terms of it being found) in placing the MySQL library in the $catalina_base/lib directory, which I believe is included by default in the common.loader. 我相信将MySQL库放在$ catalina_base / lib目录中是安全的(就被发现而言),我相信它默认包含在common.loader中。
将其复制到$TOMCAT\\lib
夹。但这取决于要在哪里管理连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.