私のjspでjqueryを使用してtabbedpanelを作成すると、次のようなエラーが発生します
私のコードは次のとおりです。
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="/struts-jquery-tags" prefix="sj" %>
<html>
<head>
<sj:head debug="true"/>
</head>
<body>
<sj:tabbedpanel id="mytabs" collapsible="true" useSelectedTabCookie="true">
<sj:tab id="tab1" target="tone" label="Tab One"/>
<sj:tab id="tab2" target="ttwo" label="Tab Two"/>
<sj:tab id="tab3" target="tthree" label="Tab Three"/>
<div id="tone"> Test 1 </div>
<div id="ttwo"> Test 2 </div>
<div id="tthree"> Test 3 </div>
</sj:tabbedpanel>
</body>
</html>
エラー:
**FreeMarker template error!**
Error reading included file template/simple/dynamic-attributes.ftl
問題のある命令:
include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on line 31, column 1 in template/jquery/tabbedpanel.ftl]
プログラマー向けの Java バックトレース:
----------
freemarker.template.TemplateException: Error reading included file template/simple/dynamic-attributes.ftl
at freemarker.core.Include.accept(Include.java:167)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at freemarker.template.Template.process(Template.java:237)
at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:58)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
at org.apache.jsp.WEB_002dINF.pages.three_jsp._jspx_meth_sj_005ftabbedpanel_005f0(three_jsp.java:116)
at org.apache.jsp.WEB_002dINF.pages.three_jsp._jspService(three_jsp.java:69)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Template template/simple/dynamic-attributes.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:495)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1490)
at freemarker.core.Include.accept(Include.java:157)
... 34 more