Attribute theme invalid for tag head according to TLD

Attribute theme invalid for tag head according to TLD

在struts-2.3.7中加入这个标签<struts:headtheme="ajax"/>,报错
 严重: Template processing error: "Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl."



Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl.

The problematic instruction:

----------

==> ${parameters.parseContent?string} [on line 45, column 26 in template/ajax/head.ftl]

后在网上一查才知道出现此问题的原因:在jsp页面用到了struts提供的ajax主题,但是声明主题时出现问题,struts2.0到struts2.1有一个重要的改变就是对ajax支持的改变,struts2.0的ajax支持主要以DWR和dojo为主,并专门提供ajax主题,如:,但是在struts2.1不再提供ajax主题,而将原来的ajax主题放入了dojo插件中,我们需要将dojo标签引入到jsp页面, 再改为

<%@ taglib uri="/struts-tags" prefix="struts"%> 

<%@ taglib uri="/struts-dojo-tags" prefix="sx"%> 

<sx:head theme="ajax"/>

后又出现异常Attribute theme invalid for tag head according to TLD

经过网上查询,又将上面<sx:head theme="ajax" />改成下面这两行,其他的不用改:

<struts:head theme="xhtml"/>

<sx:head parseContent="true"/>

问题解决了,但是原因还是没弄明白。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值