参考路劲:http://elf8848.iteye.com/blog/2008595
        :http://blog.csdn.net/muziruoyi/article/details/44081209


<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webapp.root</param-value>
</context-param>




 "webapp.root"这个字符串可以随便写任何字符串。如果不配置默认值是"webapp.root"。
 
可以用System.getProperty("webapp.root")来动态获项目的运行路径。
一般返回结果例如:/usr/local/tomcat6/webapps/项目名
Logo

快速构建 Web 应用程序

更多推荐