Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.9, 2.4.0-rc-1
-
None
-
Java 1.8, Mac 10.9.4, Groovy 2.3.x, Servlet 2.5 (Google App Engine)
Description
Groovy's TemplateServlet allows init-param to swap the template engine implementation such that the following should work:
<init-param> <param-name>template.engine</param-name> <param-value>groovy.text.markup.MarkupTemplateEngine</param-value> </init-param>
This give's exception :
SEVERE: javax.servlet.ServletContext log: markupTemplateServlet: Could not instantiate template engine: groovy.text.markup.MarkupTemplateEngine java.lang.InstantiationException: groovy.text.markup.MarkupTemplateEngine.<init>()
It understandably wouldn't work as MarkupTemplateEngine doesn't provide any default constructor. Even if it did, there wouldn't be a possibility to pass the desired configuration object to this servlet.