【求救】引入Struts2标签库sx:datetimepicker,/struts-dojo-tags报错"/template/~~~ajax/controlheader-core.ftl")

求不用降版本的解决办法

网上说是因为使用Struts2.3.16.1遇到如下错误,不能导入struts2-dojo-plugin-2.3.15.jar中的模版,是Struts2.3.16.1本身的问题会在以后的版本中修复,Struts2.3.15中没有这个问题。

我使用的是struts2.3.35 和 struts2-dojo-plugin-2.1.8.jar,出现了同样的错误,。。。

 

关于jar包:

struts2.3.35   +   spring4.0.0   +   hibernate4.2.21

poi-3.8

还有这些:

【求救】引入Struts2标签库sx:datetimepicker,/struts-dojo-tags报错

 

导入struts2-dojo-plugin-2.1.8.jar,<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

运行报错:

Template inclusion failed (for parameter value "/template/~~~ajax/controlheader-core.ftl"):
Template not found for name "template/~~~ajax/controlheader-core.ftl".
The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@642e1539.

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #include "/${parameters.templateDir}/...  [in template "template/xhtml/controlheader.ftl" at line 23, column 1]
    - Reached through: #include "/${parameters.templateDir}/...  [in template "template/ajax/controlheader.ftl" at line 24, column 9]
    - Reached through: #include "/${parameters.templateDir}/...  [in template "template/ajax/datetimepicker.ftl" at line 23, column 1]

。。。。。。。。

freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]

Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "template/~~~ajax/controlheader-core.ftl".
The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@642e1539.
    at freemarker.template.Configuration.getTemplate(Configuration.java:2797)
    at freemarker.core.Environment.getTemplateForInclusion(Environment.java:2540)
    at freemarker.core.Include.accept(Include.java:162)
    ... 106 more


。。。。。。。

java.io.IOException: Stream closed

 

以下是lib的截图:

【求救】引入Struts2标签库sx:datetimepicker,/struts-dojo-tags报错【求救】引入Struts2标签库sx:datetimepicker,/struts-dojo-tags报错

 

你可能感兴趣的:(struts2)