I want to catch all requests inside a filter in AEM 6.3. The filter is the following:
@Component(
property = {
"pattern=/.*",
"service.ranking=" + TryFilter.SERVICE_RANKING
}
)
public class TryFilter implements Filter {
public static final int SERVICE_RANKING = 2147483647;
private static final Logger LOG = LoggerFactory.getLogger(TryFilter.class);
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
LOG.debug("Begin Filter");
LOG.debug("End Filter");
}
@Override
public void destroy() {
}
The problem is the filter does not catch requests like http://localhost:4502/aem/start.html Especially requests that end in .html. Do you have any idea about what can be the problem? I checked the patternUrl for the filter, but for http://localhost:4502/crx/de/index.jsp it works.