用Freemarker做页面视图时,为了在页面中使用struts2标签,将Struts2核心包里面的struts-tags.tld解压出来放在了WEB-INF文件夹下,页面加入<#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"]>
不过老是报错:
Multiple annotations found at this line:
- cvc-type.3.1.3: The value '2.2.3' of element 'tlib-version' is not valid.
- cvc-datatype-valid.1.2.1: '2.2.3' is not a valid value for 'decimal'.
报错的部分如下:
<tlib-version>2.2.3</tlib-version>
原因:
XML validation issue on struts-tags.tld for <tlib-version> which should be in X.Y format instead of X.Y.Z
参见:https://issues.apache.org/jira/browse/WW-3299
改为<tlib-version>2.2</tlib-version> 解决