标签:
在web中添加一段代码
<servlet> <servlet-name>freemarker</servlet-name> <servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class> <!-- 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>ContentType</param-name> <param-value>textml</param-value> </init-param> <init-param> <param-name>template_update_delay</param-name> <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. --> </init-param> <init-param> <param-name>locale</param-name> <param-value>zh_CN</param-value> </init-param> <init-param> <param-name>default_encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>boolean_format</param-name> <param-value>true,false</param-value> </init-param> <init-param> <param-name>number_format</param-name> <param-value>0.##########</param-value> </init-param> </servlet> <!-- freemarker--> <servlet-mapping> <servlet-name>freemarker</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>
标签:
原文地址:http://www.cnblogs.com/mytzq/p/4829158.html