org.apache.catalina.startup.ContextConfig.getContextWebXmlSource() normally doesn't follow symlinks. So, if the Constants.ApplicationWebXml i.e. "/WEB-INF/web.xml" due to this cannot be read, 1) mention the full path where you were looking in an error message 2) put this as "SEVERE" in the catalina out log Otherwise, you can waste hours with <<HTTP Status 404 – Not Found Type Status Report Message /index_en.jsp;jsessionid=A3944DE3830D9AF59D3970DDBA Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.>>
the root cause probably was that in server.xml, the path to <Context path="" docBase="/home/me/dir/app/" reloadable="true" workDir=... was after change pointing to a symLink. (using tomcat inside the IDE)
The previous issue hadn't been forgotten. I'll mark it as a duplicate of this one shortly. Since the original issue was raised, the resource handling has been significantly refactored. It looks like it will be possible to catch files being ignored because of symlinks in a single place. It seems unlikely to me that users would want a symlink to be ignored otherwise why create the symlink in the fist place? I am therefore experimenting with logging an error message whenever a file is ignored due to it being accessed via a symlink. I do think SEVERE is too excessive for the general case. It is probably appropriate for some files (like web.xml) but I don't want to start down the path of checking for files names before deciding on the log level. WARN seems reasonable.
*** Bug 57892 has been marked as a duplicate of this bug. ***
Thanks - I agree that a "SEVERE" for every symlink file is too much. But if it is for the Context's "docBase" and "workDir" which essentially means that an entire web app will not start, it really should be SEVERE ! Especially because the error message visible is really not helpful to find the cause
What I am trying to avoid is an every increasing list of "critical" file names. Logging at error (SEVERE) if the path starts with /WEB-INF or /META-INF should catch all the important config files.
Fixed in: - 10.0.x for 10.0.0-M10 onwards - 9.0.x for 9.0.40 onwards - 8.5.x for 8.5.60 onwards - 7.0.x for 7.0.107 onwards