urlrewritefilter icon indicating copy to clipboard operation
urlrewritefilter copied to clipboard

Tomcat 7.0.42 to Tomcat 7.0.72 causes "could not get servlet context"

Open ESRuth opened this issue 8 years ago • 1 comments

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.

ESRuth avatar Oct 19 '16 16:10 ESRuth

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.

royling avatar May 12 '17 11:05 royling