urlrewritefilter
urlrewritefilter copied to clipboard
Tomcat 7.0.42 to Tomcat 7.0.72 causes "could not get servlet context"
There is a ROOT.xml in ./conf/Catalina/localhost which has UrlRwriteFilter defined and a urlrewrite.xml. There is another app on the server which also has UrlRewriteFilter defined and has it's own urlrewrite.xml. The first thing the server does is load the UrlRewriteFilter, which because the other app(s) are not loaded, yet, cannot get the servlet context.
The same issue here.
The rule conf is parsed during the filter initialization (ie, filter.init
-> rule.initialise
where it is trying to get the target context (not loaded yet).
Could we defer this getServletContext
call to the run phase?
UPDATE: this is duplicate of #153, a workaround is provided there.