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?