Struts2 / GAE:严重:模板处理错误

时间:2014-08-19 19:13:28

标签: java google-app-engine struts2

我正在按照本教程将Struts2与Google App Engine集成:

http://www.mkyong.com/google-app-engine/google-app-engine-struts-2-example/

我的构建路径如下所示:

Struts2 app engine

但我有以下堆栈跟踪:

  

严重:模板处理错误:"表达参数.templateDir   未定义在template / xhtml / form.ftl第23行第23行。"

     

表达参数.templateDir在第23行第15行未定义

     

在template / xhtml / form.ftl中。有问题的指示:

     

==> $ {parameters.templateDir} [在第23行,template / xhtml / form.ftl中的第13列]中包含   " / $ {parameters.templateDir} /xhtml/form-validate.ftl" [第23行,

     

template / xhtml / form.ftl中的第1列

     

程序员的Java回溯:   ---------- freemarker.core.InvalidReferenceException:表达式parameters.templateDir在第23行第15行未定义   模板/ XHTML / form.ftl。在   freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)     在freemarker.core.Expression.getStringValue(Expression.java:118)at   freemarker.core.Expression.getStringValue(Expression.java:93)at   freemarker.core.DollarVariable.accept(DollarVariable.java:76)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.renderElementToString(Environment.java:1594)     在   freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101)     在freemarker.core.Include.accept(Include.java:124)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:157)     在   org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)     在   org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59)     在   org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)     在   org.apache.jsp.User.pages.login_jsp._jspx_meth_s_005fform_005f0(login_jsp.java:101)     在org.apache.jsp.User.pages.login_jsp._jspService(login_jsp.java:73)     在org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:717)at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)     在   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)     在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)     在   com.google.appengine.tools.development.PrivilegedJspServlet.access $ 101(PrivilegedJspServlet.java:23)     在   com.google.appengine.tools.development.PrivilegedJspServlet $ 2.run(PrivilegedJspServlet.java:61)     在java.security.AccessController.doPrivileged(Native Method)at   com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:58)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:717)at   org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1166)     在   com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)     在   com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)     在   com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)     在   org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)     在   org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)     在   org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)     在   org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)     在   com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)     在org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)     在org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)     在   org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:157)     在   org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)at at   com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)     在   org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)     在   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)     在   org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)     在   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)     在   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)     在   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)     在   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)     在   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)     在   org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)     在   org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)     在   org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)     在   org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在   com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)     在   org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1157)     在

0 个答案:

没有答案