Created
May 5, 2017 03:39
-
-
Save alexlamazing/70e0031a1652d6e09e214ce1a714c7fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--**************************** Freemarker ************************************ --> | |
<servlet> | |
<servlet-name>freemarker</servlet-name> | |
<servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class> | |
<!-- | |
Init-param documentation: | |
http://freemarker.org/docs/api/freemarker/ext/servlet/FreemarkerServlet.html | |
--> | |
<!-- FreemarkerServlet settings: --> | |
<init-param> | |
<param-name>TemplatePath</param-name> | |
<param-value>/</param-value> | |
</init-param> | |
<init-param> | |
<param-name>NoCache</param-name> | |
<param-value>true</param-value> | |
</init-param> | |
<init-param> | |
<param-name>ResponseCharacterEncoding</param-name> | |
<!-- Use the output_encoding setting of FreeMarker: --> | |
<param-value>fromTemplate</param-value> | |
</init-param> | |
<init-param> | |
<param-name>ExceptionOnMissingTemplate</param-name> | |
<!-- true => HTTP 500 on missing template, instead of HTTP 404. --> | |
<param-value>true</param-value> | |
</init-param> | |
<!-- FreeMarker engine settings: --> | |
<init-param> | |
<param-name>incompatible_improvements</param-name> | |
<param-value>2.3.24</param-value> | |
<!-- | |
Recommended to set to a high value. | |
See: http://freemarker.org/docs/pgui_config_incompatible_improvements.html | |
--> | |
</init-param> | |
<init-param> | |
<param-name>template_exception_handler</param-name> | |
<!-- Use "html_debug" during development! --> | |
<param-value>rethrow</param-value> | |
</init-param> | |
<init-param> | |
<param-name>template_update_delay</param-name> | |
<!-- Use 0 during development! Consider what value you need otherwise. --> | |
<param-value>30 s</param-value> | |
</init-param> | |
<init-param> | |
<param-name>default_encoding</param-name> | |
<!-- The encoding of the template files: --> | |
<param-value>UTF-8</param-value> | |
</init-param> | |
<init-param> | |
<param-name>output_encoding</param-name> | |
<!-- The encoding of the template output; Note that you must set | |
"ResponseCharacterEncodring" to "fromTemplate" for this to work! --> | |
<param-value>UTF-8</param-value> | |
</init-param> | |
<init-param> | |
<param-name>locale</param-name> | |
<!-- Influences number and date/time formatting, etc. --> | |
<param-value>en_US</param-value> | |
</init-param> | |
<init-param> | |
<param-name>number_format</param-name> | |
<param-value>0.##########</param-value> | |
</init-param> | |
<load-on-startup>1</load-on-startup> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>freemarker</servlet-name> | |
<url-pattern>*.ftl</url-pattern> | |
<!-- HTML and XML auto-escaped if incompatible_improvements >= 2.3.24: --> | |
<url-pattern>*.ftlh</url-pattern> | |
<url-pattern>*.ftlx</url-pattern> | |
</servlet-mapping> | |
<!-- | |
Prevent the visiting of MVC Views from outside the servlet container. | |
RequestDispatcher.forward/include should, and will still work. | |
Removing this may open security holes! | |
--> | |
<security-constraint> | |
<web-resource-collection> | |
<web-resource-name>FreeMarker MVC Views</web-resource-name> | |
<url-pattern>*.ftl</url-pattern> | |
<url-pattern>*.ftlh</url-pattern> | |
<url-pattern>*.ftlx</url-pattern> | |
</web-resource-collection> | |
<auth-constraint> | |
<!-- Nobody is allowed to visit these directly. --> | |
</auth-constraint> | |
</security-constraint> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment