Log exception in ErrorPageFilter

Fixes gh-1130
Hack around with Tomcat resource paths

Tomcat 8 has different APIs again so it was quite difficult to
get it working and test it. The test is manual anyway (multi-module
project with JSPs in /META-INF/resources, not part of the samples),
and requires you to build a war and execute it (since the resource
paths are different when it's an archive).

Fixes gh-1131