Tomcat下war应用配置数据源又一方法
把配置写于/META-INF/context.xml中,例:
<Context path="/axis2" privileged="true" antiResourceLocking="false" antiJARLocking="false">
<ResourceLink
name="jdbc/BPMSDB"
global="BPMSDB"
type="javax.sql.DataSource"
/>
</Context>
查看定义文件,comtext在tomcat5.5中可出现的位置有:
- in the $CATALINA_HOME/conf/context.xml file: the Context element information will be loaded by all webapps
- in the $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default file: the Context element information will be loaded by all webapps of that host
- in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path. Multi-level context paths may be defined using #, e.g. context#path.xml. The default web application may be defined by using a file called ROOT.xml.
- if the previous file was not found for this application, in an individual file at /META-INF/context.xml inside the application files
- inside a Host element in the main conf/server.xml
分享到:
相关推荐
创建JNDI让程序找到solr/home(当然你也可以用System Properties方式), 在WebRoot/META-INF目下创建context.xml 文件,并写入以下字符 <?xml version='1.0' encoding='utf-8'?> <Context> ...
在pom.xml中添加所需要的jar包 使用Maven POM editor打开项目中的pom.xml文件,选择Dependencies,在Dependencies栏目点击Add进行,首先弹出一个搜索按钮,例如输入spring-web,就会自动搜索关于spring-web相关的jar...
创建JNDI让程序找到solr/home(当然你也可以用System Properties方式), 在WebRoot/META-INF目下创建context.xml 文件,并写入以下字符 <?xml version='1.0' encoding='utf-8'?> <Context> ...
创建JNDI让程序找到solr/home(当然你也可以用System Properties方式), 在WebRoot/META-INF目下创建context.xml 文件,并写入以下字符 <?xml version='1.0' encoding='utf-8'?> <Context> ...
创建JNDI让程序找到solr/home(当然你也可以用System Properties方式), 在WebRoot/META-INF目下创建context.xml 文件,并写入以下字符 <?xml version='1.0' encoding='utf-8'?> <Context> ...
或者在WebContent/META-INF/context.xml 修改数据库的连接。 开发者请用eclipse导入此项目,使用者把LeyeOA.war放入Tomcat7\webapps 在浏览器输入http://localhost:8080/LeyeOA/ 初始用户名密码 administrator ...
如果安装在其他位置,则应仅调整META-INF / context.xml文件(当前为“ webapps / rhizomer / META-INF / users.xml”)中users.xml文件的路径。 只有一个默认用户,名为“ rhizomer”,密码为“ rhizomer”。 基本...
这是activiti-5.20.0版本的activiti-explorer,数据源改为了JNDI,数据库部署好之后,把本war包放到tomcat里面,然后修改activiti-explorer\META-INF\context.xml里面的数据库配置。
项目描述 此项目是java web的一个课程设计,基本完成了所有功能,基于bootstrap框架写的 运行环境 jdk7+tomcat7+mysql+...1.务必把Education_system\WebRoot\META-INF\context.xml也需要发布,否则找不到jndi数据源
这是activiti-5.20.0版本的activiti-explorer,数据源改为了JNDI,数据库部署好之后,把本war包放到tomcat里面,然后修改activiti-explorer\META-INF\context.xml里面的数据库配置。