I am trying to implement a global content rewriter as documented here: HST Rewriting rich text field runtime
I am trying this in Bloomreach v15.1.4
I have followed the steps, i.e:
- Edit site/webapp/src/main/webapp/WEB-INF/hst-config.properties to add the property:
# Override the default HST ContentRewriter
default.hst.contentrewriter.class = com.example.CustomInternalLinksContentRewriter
- I have also implemented the CustomInternalLinksContentRewriter this way:
public class CustomInternalLinksContentRewriter extends SimpleContentRewriter {
@Override
public String rewrite(final String html, final Node node, final HstRequestContext requestContext, final Mount targetMount) {
//..
}
}
This is not working, I have put breakpoints in this class and additional logging but it seems it’s never called. I have also added break points in the SimpleContentRewriter class and it seems the rewrite methods in that class as well are not called.
Is there something that I am missing?