XML output with Freemarker

We are using freemarker for templates in our web application. We are using spring FreeMarkerViewResolver for this.

Is there a way in freemarker to change the content type of the answer to

Text / XML

Is there a way to do this in a template?

+1


a source to share


1 answer


You cannot do this from the template itself, no, but you can add a FreeMarkerViewResolver with a contentType property and set it to text / xml (or whatever).



If you need different content types for different views, you need to configure multiple ad permissions.

+1


a source







All Articles