Where to put context.xml with Eclipse WTP?

ⅰ亾dé卋堺 提交于 2019-12-04 03:15:19

问题


I'm using Eclipse Indigo 3.7 + WTP + m2e (including m2e-wtp). I've configured my Tomcat 7.0 server on Eclipse. I have a web application that I'm 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 issues to my app.

Where the context.xml should be put in order to be copied to this directory?

Thanks


回答1:


If you need to specify a context.xml file when deploying a WAR file to Tomcat, then it must be included within the WAR. The simplest way to achieve this is by adding it to your webapp resources:

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

When You will build your web app (*.war) maven will join it to WAR in suitable place.



来源:https://stackoverflow.com/questions/12246993/where-to-put-context-xml-with-eclipse-wtp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!