3
votes

Everthing I've read about Tomcat seems to indicate that when I deploy my web application, Tomcat will take my context.xml file, copy it to <tomcat-dir><engine-name><host> and rename it to <mywebbappname>.xml.

...only it doesn't.

I have Liferay 6 bundled with Tomcat 6 deployed on my machine. The context.xml file for my webapp is very basic:

<Context privileged="true" crossContext="true"></Context>

My context.xml file is located under the META-INF directory which is at the same level as my WEB-INF directory.

I think the structure is set up correctly, but when Tomcat deploys the WAR, the context.xml doesn't get copied or renamed. If I manually create <tomcat-dir>\<engine-name>\<host>\<mywebbappname>.xml everything works fine.

This is okay for development, but I have to restart Tomcat for it to see my context which won't work in a production environment.

Am I missing some small detail here?

Thanks,

David

1
Is Tomcat setup for auto-deployment?Buhake Sindi
@the-elite-gentleman Sorry, Mr. Elite, I totally missed your question. The answer is yes. I can drop my WAR either in the Tomcat webapps directory or, since I'm using Liferay, the Liferay hot deploy directory. Either way, the webapp deploys, but nothing happens with the context.xml.David

1 Answers

3
votes

This is actually a bug that was recently fixed. The solution is simple in /conf/server.xml search for the deployXML. It will be set to false, instead change this to true and you should see the expected behavior.

Edit: I've also found the issue @ http://issues.liferay.com/browse/LPS-17916