Struts2 template加载 默认是ftl的道理

Struts2 template加载 默认是ftl的道理

一般情况下,如果我们需要修改struts标签的表现,方法就是:

  1. 指定使用的theme
  2. 将struts-core.jar中的theme拷贝出来,解压到classpath下目录名应该为template/${theme}
  3. 修改theme中对应的ftl文件

为什么默认使用的是ftl,在何处定义的或者配置的呢?

Alternative Template Engines

The framework provides for template rendering engines other than FreeMarker. (Though, there is rarely a need to use another system!)

Don’t try this at home!

Alternative template engines are best left to advanced users with special needs!

The framework supports three template engines, which can be controlled by the struts.ui.templateSuffix in struts.properties.

ftl (default)FreeMarker-based template engine
vmVelocity-based template engine
jspJSP-based template engine

译:

可选模板的解析引擎

这个框架提供了除freemarker之外的其他解析引擎.(即使很少有需要需要这样做!)

不要随意尝试!

可选的引擎仅供很熟许的人和很特别的需求使用!

Struts框架提供了三个模板引擎,可以通过strtus.properties中的struts.ui.templateSuffix进行控制。

NOTE: 附上官方链接

在我自己寻找的过程中,并非是struts.properties或者struts-default.properties,而是struts-core.jar中org.apache.struts2下的default.properties.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值