How to specify path in META-INF/context.xml for Tomcat

前端 未结 4 2012
-上瘾入骨i
-上瘾入骨i 2021-02-05 14:05

I\'m using Tomcat 7 and would like to set the context root of a war file in the war file itself and have Tomcat autodeploy and pick up this path. I thought I found the way to

4条回答
  •  难免孤独
    2021-02-05 15:00

    If you load your application.war to a directory Tomcat isn't aware of, how can it read anything in your war file? The correct place to add this information is in $TOMCAT_HOME/conf/context.xml - this is part of Tomcat and Tomcat can read this file and find out where your application is and deploy it. There's more on how to set up JNDI in Tomcat

提交回复
热议问题