Re: Extending Rewrite Filter to add attribute

Splash Forums Rewrite Users Extending Rewrite Filter to add attribute Re: Extending Rewrite Filter to add attribute

#23225

Hi there,

You can use a RewriteLifecycleListener for this purpose:

https://github.com/ocpsoft/rewrite/blob/master/api-servlet/src/main/java/org/ocpsoft/rewrite/servlet/spi/RewriteLifecycleListener.java

(You might want to extend HttpRewriteLifecycleListener as a base class.)

You’d probably to add your attributes in the beforeInboundRewrite() method.

~Lincoln