在server.xml中定义的tomcat上下文没有加载

我有一个path上部署的Web应用程序

/var/lib/tomcat6/webapps/abc/</code> 

/etc/tomcat/server.xmlpath下的server.xml添加了以下几行。

 <上下文docBase =“/ var / lib / tomcat6 / webapps / abc /”path =“/”reloadable =“true”>

   <Resource auth =“Container”driverClassName =“com.mysql.jdbc.Driver”maxActive =“20”maxIdle =“10”maxWait =“10000”name =“jdbc / abcDB”password =“abc”type =“javax。 sql.DataSource“url =”jdbc:mysql:// localhost:3306 / abc“username =”abc“/>

 </上下文>

在主机标签内。

当我重新启动tomcat,并打http://localhost:8080/什么都没有出现,但是当我inputhttp://localhost:8080/abc主页显示,这意味着上面的项在server.xml没有影响。

我究竟做错了什么 ??

看起来你想设置webapp abc作为默认的web应用程序(即通过http:// localhost:8080 /直接访问它),然后在Context中将路径设置为"" not“/”

从Tomcat文档中,

如果您指定了空字符串(“”)的上下文路径,那么您将为此主机定义默认的Web应用程序,该应用程序将处理未分配给其他上下文的所有请求