I have issued that when an image or other static resource for rendering page is requested and not found by webapp server, my wicket appication is trying to render an error page configured in application. I would like an error page to NOT be instantiated when lookup for image or other static resource fails.
We have configured an error page as follows
in Application init:
mount(new HybridUrlCodingStrategy("/404", NotFoundErrorPage.class));
also in wicket filter
<init-param> <param-name>ignorePaths</param-name> <param-value>static/,external/,...</param-value> </init-param>
When wicket filter processing request for /static/.../image.png it indeed identifies "static" part in requestPath, and doing just filter.doChain, after that resource is not found by DefaultServlet and redispatched to /404 as configured in web.xml. After redispatching WicketFilter comes again in the stack with resourcePath set to 404 this time which is now not identified as ignorePath part and looks for an error page.
Do I miss something, or this is a correct behaviour? Is there any way to avoid this?