Write context file on deploy and restart tomcat when context files are written.