Summary: | warn "SEVERE" if /WEB-INF/web.xml not found | ||
---|---|---|---|
Product: | Tomcat 9 | Reporter: | Ralf Hauser <hauser> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 9.0.x | ||
Target Milestone: | ----- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Ralf Hauser
2020-11-04 14:37:42 UTC
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 |