10039---web.xml中webAppRootKey
来源:互联网 发布:js字符串比较相等 编辑:程序博客网 时间:2024/05/18 06:22
原文
web.xml中webAppRootKey
------------------------------------------------------------------------------------------------1、 web.xml配置
<context-param><param-name>webAppRootKey</param-name><param-value>webapp.root</param-value></context-param>
可以用System.getProperty("webapp.root")来动态获项目的运行路径。
一般返回结果例如:/usr/local/tomcat6/webapps/项目名
2、解决以下报错
部署在同一容器中的Web项目,要配置不同的<param-value>,不能重复,否则报类似下面的错误:Web app root system property already set to different value: 'webapp.root' = [/home/user/tomcat/webapps/project1/] instead of [/home/user/tomcat/webapps/project2/] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
意思是“webapp.root”这个key已经指向了项目1,不可以再指向项目2.
3、加载方式
Spring通过org.springframework.web.util.WebAppRootListener这个监听器来运行时的项目路径。但是如果在web.xml中已经配置了 org.springframework.web.util.Log4jConfigListener这个监听器,
则不需要配置WebAppRootListener了。因为Log4jConfigListener已经包含了WebAppRootListener的功能
一般配置类型下面的例子:
阅读全文
0 0
- 10039---web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中webAppRootKey
- web.xml中使用webAppRootKey
- 进程管理---进程
- openCV3 在ubuntu14上的配置
- HDU6034-Balala Power! 贪心
- Android 数据库优化
- ARM开发(1) 基于stm32的led跑马灯
- 10039---web.xml中webAppRootKey
- 35. Search Insert Position
- linux下查看端口对应的进程号
- asp.net不用服务器控件
- 学习加密算法
- 解决跨域问题
- 1001.Add More Zero
- String inequality
- Ubuntu mirror source modify