struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4359) Parent template resolution fails
Date Wed, 11 Jun 2014 11:41:01 GMT

     [ https://issues.apache.org/jira/browse/WW-4359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lukasz Lenart updated WW-4359:
------------------------------

    Fix Version/s: 2.3.18

> Parent template resolution fails
> --------------------------------
>
>                 Key: WW-4359
>                 URL: https://issues.apache.org/jira/browse/WW-4359
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>         Environment: Tomcat 7.0.50 (Maven embedded with tomcat7-maven-plugin)
> Java 1.7.0_60
> Ubuntu 13.10
>            Reporter: Boris Morris
>            Priority: Blocker
>              Labels: freemarker, template, templates
>
> The update to 2.3.16.3 from 2.3.15.3 my custom templates no longer seem to work.
> I have a custom theme that has a template called text.ftl, it contains two lines. One
calls the control header from my theme and the other calls the text.ftl from the parent theme,
simple. 
> {noformat}
> <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl"
/>
> <#include "/${parameters.templateDir}/simple/text.ftl" />
> {noformat}
> I haven't changed simple's text.ftl so that goes on to include css.ftl.
> Here, is where the issue is. When simple includes css.ftl, it uses expandTheme. This
causes the template name to be name to be expanded to 
> From my understanding of [WW-4145|https://issues.apache.org/jira/browse/WW-4145] this
should go to the parent theme of my theme - i.e. it should delegate back to simple's css.ftl.
> The issue is that I get the following error (logs on TRACE):
> {noformat}
> java.io.FileNotFoundException: Template template/~~~dotecon/css.ftl not found.
> 	at freemarker.template.Configuration.getTemplate(Configuration.java:580)
> 	at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1490)
> 	at freemarker.core.Include.accept(Include.java:157)
> 	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.include(Environment.java:1508)
> 	at freemarker.core.Include.accept(Include.java:169)
> 	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:259)
> 	at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:158)
> 	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:593)
> 	at org.apache.struts2.components.UIBean.end(UIBean.java:547)
> 	at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
> 	at org.apache.jsp.WEB_002dINF.jsp.auctioneer.RoundPrices_jsp._jspx_meth_s_005ftextfield_005f2(RoundPrices_jsp.java:8094)
> 	at org.apache.jsp.WEB_002dINF.jsp.auctioneer.RoundPrices_jsp._jspx_meth_s_005felse_005f18(RoundPrices_jsp.java:8055)
> 	at org.apache.jsp.WEB_002dINF.jsp.auctioneer.RoundPrices_jsp._jspx_meth_display_005fcolumn_005f36(RoundPrices_jsp.java:7950)
> 	at org.apache.jsp.WEB_002dINF.jsp.auctioneer.RoundPrices_jsp._jspx_meth_s_005fif_005f43(RoundPrices_jsp.java:7902)
> 	at org.apache.jsp.WEB_002dINF.jsp.auctioneer.RoundPrices_jsp._jspService(RoundPrices_jsp.java:1134)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
> 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
> 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
> 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
> 	at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
> 	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
> 	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.LockingInterceptor.intercept(LockingInterceptor.java:45)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.SessionContextInterceptor.intercept(SessionContextInterceptor.java:41)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.BaseAuthenticationInterceptor.intercept(BaseAuthenticationInterceptor.java:75)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.ResponseHeaderInterceptor.intercept(ResponseHeaderInterceptor.java:32)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.MDCInterceptor.intercept(MDCInterceptor.java:72)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
> 	at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:233)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
> 	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.LockingInterceptor.intercept(LockingInterceptor.java:45)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.SessionContextInterceptor.intercept(SessionContextInterceptor.java:55)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.BaseAuthenticationInterceptor.intercept(BaseAuthenticationInterceptor.java:97)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.ResponseHeaderInterceptor.intercept(ResponseHeaderInterceptor.java:32)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at com.dotecon.interceptors.MDCInterceptor.intercept(MDCInterceptor.java:76)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> 	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
> 	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)
> 	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at ch.qos.logback.classic.helpers.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:51)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
> 	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
> 	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
> 	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> 	at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message