Reply To: Multiple rewrite url value from database

Splash Forums Rewrite Users Multiple rewrite url value from database Reply To: Multiple rewrite url value from database

#27028

Christian is right, you probably want to either trigger a purge of the the ServletContext configuration cache:

context.put(ServletContextConfigurationCacheProvider.class.getName() + "_cachedConfig", null)

Or… you can implement your own HttpConfigurationCacheProvider and register it as documented here:

https://github.com/ocpsoft/rewrite/blob/master/api/src/main/java/org/ocpsoft/rewrite/spi/ConfigurationCacheProvider.java#L25

(Just make sure the priority is set to a lower number than the existing ServletContext cache provider’s priority (to override it.)

However, in order for this to work, you will also need to disable the ServletContext cache entirely:

 <context-param>
    <param-name>org.ocpsoft.rewrite.config.CONFIG_RELOADING</param-name>
    <param-value>true</param-value>
  </context-param>

~Lincoln