urlrewritefilter icon indicating copy to clipboard operation
urlrewritefilter copied to clipboard

Dynamic config loading (eg from a Servlet) isn't possible

Open z-br opened this issue 10 years ago • 3 comments

I'm trying to load the urlrewrite.xml dynamically, in this case from a servlet that translates Jade into XML under the url /urlrewriteconfig.

Since filters are loaded before servlets (I'm guessing this is the reason) I get this error message:

INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter ERROR: unable to find urlrewrite conf file at /urlrewriteconfig

But then I said the dynamic reload to 1 second , and it still never ends up loading (and I get no subsequent error messages). Is it not possible to load from a URL? Ideally, I would like to load from a servlet before the filter is even made available - can I do this in code somehow? I'd be happy to explicitly grab the filter and tell it what the config is, if that is possible (ideally from a URL/Stream).

This is my config:

<init-param>
   <param-name>confPath</param-name>
   <param-value>/urlrewriteconfig</param-value>  
  </init-param>
  <init-param>
     <param-name>confReloadCheckInterval</param-name>
     <param-value>1</param-value>
 </init-param>

z-br avatar Jul 31 '15 23:07 z-br

Anyone have thoughts on this? I haven't been able to figure anything out.

z-br avatar Aug 12 '15 20:08 z-br

How are you running your application? There is currently an open issue at spring-boot, which could be related. https://github.com/spring-projects/spring-boot/issues/3627#issuecomment-190862326

outofrange avatar Apr 09 '16 10:04 outofrange

I am using standard tomcat in amazon elastic beanstalk. No Spring.

z-br avatar Apr 14 '16 18:04 z-br