struts 2.0.6GA開始試螃蟹,照著struts2的tag文檔寫成<@s.datetimepicker/>,結果老是報錯
211672?[http-8080-Processor25]?ERROR?freemarker.runtime??-?
on?line?7,?column?17?in?admin/index.ftl?s.datetimepicker?not?found.
The?problematic?instruction:
----------
==>?user-directive?s.datetimepicker?[on?line?7,?column?17?in?admin/index.ftl]
----------
Java?backtrace?for?programmers:
----------
freemarker.core.InvalidReferenceException:?on?line?7,?column?17?in?admin/index.ftl?s.datetimepicker?not?found.
試著google一下,正好有人也提交了這個
bug,改成 <@s.dateTimePicker />,問題解決
The?fix?is?as?follows:
In?struts2-core-2.0.6:
org.apache.struts2.views.freemarker.tags.StrutsModels
has?a?method
getDateTimePicker()
Which?should?be?re-named:
getDatetimepicker()
to?match?with?the?naming?convention.