Where to put context.xml with Eclipse WTP?

I am using Eclipse Indigo 3.7 + WTP + m2e (including m2e-wtp). I configured my Tomcat 7.0 server on Eclipse. I have a web application that I am trying to run on Tomcat through Eclipse, but when I run it, the context.xml file is not copied to the conf/Catalina/localhost directory and this causes some problems in my application.

Where should context.xml be placed to copy to this directory?

thanks

+7
source share
1 answer

If you need to specify the context.xml file when deploying the Tomcat WAR file, it must be included in the WAR. The easiest way to achieve this is to add it to your webapp resources:

 src |_ main |_ webapp |_ META-INF |_ context.xml 

When you create your web application (* .war), maven will join the WAR in a suitable location.

+10
source

Source: https://habr.com/ru/post/924441/


All Articles