Adding to the headers of the bug; Apache 2.0.54 was used with mod_jk 1.2.13 on Redhat 9 Hi, One of our customers uses SSI (mod_include) to include their jsp's eg file index.shtml (located in /web/customer/www) <!--#include virtual="top.html"--> <!--#include virtual="active/news.jsp?${QUERY_STRING}"--> <!--#include virtual="bottom.html"--> What happens is that "top" and "news" are displayed correctly, but bottom fails with "[an error occurred while processing this directive]". If we move the include of "bottom.html" above the jsp line it works (besides from the webpage not displaying as desired :) The errorlog contains the following lines after requesting the page from apache; File does not exist: /web/customer/www/active/bottom.html unable to include "bottom.html" in parsed file /web/customer/www/index.shtml If found Bug #34232 mentioning the same, but it was discarded as being apache and/or mod_include. I didn't find any references to a new(er) ticket in ASF. The current workaround for our customer would be to update their files to 'include virtual="../bottom.html"' or revert back to their original "exec cgi" statements (which worked, but we agreed with them upon that being deprecated). For some reason the "include virtual" (or include file which causes the same) that executes the 'jsp' sets the current working directory to "active" instead of going 'back' to the directory where index.shtml was parsed from. Any suggestions or options are welcome, Tom
Also reported Bug #36191 to Apache/mod_include but the conclusion was it wasn't mod_include. Can anyone help us with this issue? Tom
I have replicated this problem with Apache 2.0.54 and JK 1.2.14 with the latest versions (from SVN/CVS) of both TC4 and TC5. It looks like the problem is in the native JK code but I am afraid I don't know where to start looking. I am moving this issue to TC5 since that is the current focus of development.
I don't have a fix for this yet (I'm not going to delve into JK for something like this), but I would always caution against relying on a working directory as a reference. It's a bad practice that leads to reduced portability when it doesn't outright fail.
Please post a WAR file we can use to reproduce this issue.
Created attachment 18959 [details] Proposed patch I have been looking into this and have tracked down the root cause and have identified a patch (attached) that fixes the issue. However, I am concerned about possible side-effects particularly with mod_dir. I have tested this as far as my mod_jk understanding allows and I don't think anything is broken but I would rather someone who knows the mod_jk codebase rather better than I reviewed this patch before I commit it.
Comment on attachment 18959 [details] Proposed patch I have done some more testing and the patch is bad - it causes some mod_dir requests to fail. I'm working on a new patch.
I have a new patch which I have tested with mod_dir and this test case and both now work as expected. This fix will be included in the mod_jk 1.2.20 onwards.
The patch caused other problems, see http://issues.apache.org/bugzilla/show_bug.cgi?id=41430. To find a good solution please participate in the discussion: http://marc.theaimsgroup.com/?l=tomcat-dev&m=117007124924707&w=2
This is still fixed in svn so I am marking this as fixed. If the fix for this gets reverted, I will re-open this bug.