You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Tinus Tate (JIRA)" <ji...@apache.org> on 2019/01/01 19:49:00 UTC
[jira] [Created] (FREEMARKER-113) TemplateExceptionHandler not
working with Jetty
Tinus Tate created FREEMARKER-113:
-------------------------------------
Summary: TemplateExceptionHandler not working with Jetty
Key: FREEMARKER-113
URL: https://issues.apache.org/jira/browse/FREEMARKER-113
Project: Apache Freemarker
Issue Type: Bug
Components: engine
Affects Versions: 2.3.28
Environment: java 8, jetty 9.4, freemarker 2.3.28, spring 5.1.2
Reporter: Tinus Tate
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.
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)