https://issues.apache.org/bugzilla/show_bug.cgi?id=56931
Bug ID: 56931
Summary: VirtualDirContext requires an absolute DocBase
Product: Tomcat 7
Version: 7.0.55
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
When a docbase is not absolute, by the usage of a symbolic link for instance,
resources are not resolved.
How to reproduce:
1- Configure a webapp with a symbolic link in the path. Typical example: A
home directory on another volume than the /home
/home/tomcat -> /volume2/home/tomcat
2- Configure the docbase to use the logical name of the docbase.
Example: /home/tomcat/webapps/ would resolve to /home/tomcat/webapps/ROOT
Expected result:
Resources are displayed.
Actual result:
Resources are not found
An investigation pointed the issue iun the VirtualDirContext class.
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/VirtualDirContext.java?revision=HEAD&view=markup#l217
When evaluating a resource, it first check if the resource is inside the
docbase.
While the resource is resolved through an absolute path, the docbase isn't.
As a result, using the example above, the resource is evaluated through
/volume2/home/tomcat/webapps/ROOT while the docbase is evaluated through
/home/tomcat/webapps/ROOT and fail.
Both path should be evaluated as absolute path.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]