I have a Servlet + JSP app running on Tomcat. I use mod-ajp to redirect apache on Tomcat using these rewrite rules:
RewriteRule ^/myapp/(.+) ajp://localhost:8009/myapp/$1 [P]
RewriteRule /myapp/(.+) ajp://localhost:8009/myapp/$1 [P]
which works fine with sessions, however, when I use these rewrite rules instead:
RewriteRule ^/subdir1/subdir2/subdir3/myapp/(.+) ajp://localhost:8009/myapp/$1 [P]
RewriteRule /subdir1/subdir2/subdir3/myapp/(.+) ajp://localhost:8009/myapp/$1 [P]
HttpSession.getAttribute("nameOfMyAttribute") returns null. I looks like sessions are "binded" to some kind of home directory which is altered by rewriting rules. Is it possible to force sessions to ignore the subdirectory? Am I missing something there?