package utils;

public class ThreadLocalTemplate {

    private static ThreadLocal<TemplateServlet> template = new ThreadLocal<TemplateServlet>();

    public static TemplateServlet get() {
        return template.get();
    }
    
    public static void set(TemplateServlet d) {
        template.set(d);
    }    
}


@@ -304,15 +304,261 @@
 ;%0A    %7D 
+%0A
    
+ %0A    //convenient for code generation, template call translation does a %60ThreadLocalTemplate.set(this)%60 where %60this%60 could be EmailServlet instead of TemplateServlet%0A    public static void set(EmailServlet d)%7B%0A        template.set(null);%0A    %7D 
 %0A%7D%0A%0A

fix compilation issue