Tomcat mapping context via server.xml

后端 未结 4 1514
耶瑟儿~
耶瑟儿~ 2021-02-08 11:07

I created a war and deployed it to my $CATALINA_HOME/webapps folder just fine. Then I wanted to test configuring it to point to a war at an arbitrary location such as c:\\tmp\\

4条回答
  •  清歌不尽
    2021-02-08 11:44

    I just ran into this problem. Slightly embarrassingly it was because I got a path wrong!

    You can verify this by checking the logs (standard error ones) under

    [Tomcat install directory]/logs

    You'll see something that looks like this:

    Jun 16, 2014 12:34:10 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base ... does not exist or is not a readable directory

    A further note (you won't get an error message for this) is that if you are deploying a war rather than an exploded webapp you have to specify the file's path and not just it's containing directory.

提交回复
热议问题