AEM: Custom override for Off-time (OOTB) expired pages
Hope all are doing great! Actually, reaching out here to get some clarification on one AEM Out of the Box feature.
- At present, if any page is marked with a past time as “Off time” or future time as “On time” , then the Sling resolution dispatches 404 response state while resolving the request. I am looking for some information on when exactly the response state gets into “committed” state ? i.e. any further updates on response thereafter would result in an illegalStateException.
- With this Out of the Box feature that AEM provides currently, I'm seeing some intermittent behavior where with random service rankings, the filter chaining is getting prioritized differently. Any idea would be helpful to know what approximate service ranking be good to chain my custom sling filter before the 404 status commitment.I’m trying to override the existing feature by injecting my filer chain at prior and redirect (301) the expired pages into some dedicated paths for certain needs (retain SEO value etc.). But intermittently the override is failing and my custom filter is chained after the 404 committed state.
- Note: I'm using Request scope filter with specific request patterns. Also, to make sure response state gets immediately commited via my custom filter, I'm flushing the buffer so that further any state change does not occur. But, still the OOTB 404 state only is getting effective.

Would be great to hear back !