How to enable support for ftlx and ftlh types

Hi All,

I am trying to enable auto escaping as mentioned [1]. However when I add a file with ftlx, it gives me error saying “file not found”. How can i enable support for these file type as well?



Hello Rahul,

Our product doesn’t support .ftlx and .ftlh extensions.

I know that it’s not ideal and will require manual work but you could use the deprecated ?html, ?xhtml and ?xml

An alternative that you could try and see if works is adding <#ftl output_format="{a valid output format}"> at the top of your ftl files.

Hope this helps and kind regards,

On top of what Lef suggested, there’s also the option of setting an init parameter on the HstFreemarkerServlet like:

      <!-- Escape output as HTML by default  -->

You can add this init param in site webapp’s web.xml file

Thanks Lef & bcanvural.