开发者

tomcat context defined in server.xml is not loading

I have a web application deployed on path

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

in server.xml on path /etc/tomcat/server.xml I have added following lines.

<Context 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"/>

</Context>

inside the host tag.

When I restart tomcat and hit http://localhost:8080/ nothing appears but when I enter http://localhost:808开发者_Python百科0/abc home page is displayed which means above entry in server.xml is not taking affect.

What am I doing wrong ??


Looks like you want to set webapp abc as the default web app (i.e. access it directly via http://localhost:8080/), then give the path as "" not "/" in Context

From the Tomcat docs,

If you specify a context path of an empty string (""), you are defining the default web application for this Host, which will process all requests not assigned to other Contexts

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜