0

I have an Apache Tomcat (Spring) application deployed inside a Docker container. Host is Centos 7, container is Debian 9.

In the past, I have run this application without any problems outside of Docker.

I deploy the application how I always have, by copying the required files into ${CATALINA_HOME}/webapps/appname/. The application is loaded fine, however a copy of the application is moved automatically to ${CATALINA_HOME}/temp/3-appname/.

I didn't think this would be a problem, but noticed that if I change a JSP page in ${CATALINA_HOME}/webapps/appname/, nothing happens. If I change it in the temp directory, the change is shown.

In my Spring application, a call to ServletContext.getRealPath("WEB-INF") results in the WEB-INF directory in the temp directory.

I'm assuming the problem is some context configuration somewhere, but I am not sure where to set it, as I have not had to set this in the past.

How can I stop the application from being served out of the temp directory, rather than the webapps directory?

Right Of Zen
  • 111
  • 2

1 Answers1

1

It turns out this was a side-effect of something I did to fix a bug:

${CATLINA_HOME}/conf/server.xml had antiResourceLocking="true" in the <Context> element. This results in multiple copies of the webapp being served from the temp directory.

Right Of Zen
  • 111
  • 2