Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3.28
-
None
-
None
-
java 8, jetty 9.4, freemarker 2.3.28, spring 5.1.2
Description
Setting a custom TemplateExceptionHandler doesn't seem to work when the application is deployed and running on the latest Jetty server.
When deployed and running on a Tomcat server the TemplateExceptionHandler works as expected.
To set a TemplateExceptionHandler i extended FreeMarkerConfigurer and override getConfiguration():
Configuration configuration = super.getConfiguration();
configuration.setTemplateExceptionHandler(new MyTemplateExceptionHandler());
return configuration;
When a template contains an error (${null}) i can see that the getConfiguration() is called (i added a log line).
With tomcat MyTemplateExceptionHandler gets called next, with jetty this doesn't happen. With jetty a jetty error page appears with the full freemarker exceptions and stacktrace,which starts with:
HTTP ERROR 500
Problem accessing /dash/sitesettings/change. Reason:
Server Error
...
This happens with the latest version of freemarker.
I hope someone can take a quick peek at what is going on.
A bit more detail can be found in a comment i added: