Update ScriptTemplateView to manage content type

This commit introduces the following changes:
 - Content type can now be properly configured
 - Default content type is "text/html"
 - Content type and charset are now properly set in the response

Issue: SPR-13379
This commit is contained in:
Sebastien Deleuze
2015-08-24 14:27:17 +02:00
parent 88405be8a5
commit 04cff89eb7
9 changed files with 143 additions and 20 deletions

View File

@@ -34,7 +34,8 @@
<mvc:groovy-configurer resource-loader-path="/test" cache-templates="false" auto-indent="true" />
<mvc:script-template-configurer engine-name="nashorn" render-function="render" charset="ISO-8859-1"
<mvc:script-template-configurer engine-name="nashorn" render-function="render"
content-type="text/plain" charset="ISO-8859-1"
resource-loader-path="classpath:" shared-engine="false">
<mvc:script location="org/springframework/web/servlet/view/script/nashorn/render.js" />
</mvc:script-template-configurer>