Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7000

Support MarkupTemplateEngine integration with TemplateServlet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.9, 2.4.0-rc-1
    • 2.3.10, 2.4.1
    • Groovlet / GSP, Templating
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kdabir Kunal Dabir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: