我有非常复杂的程序要运行。我不希望任何人深入分析,但也许有人有类似的问题或有诊断提示。正在使用Apache Tomcat启动应用程序。这些是我看到浏览页面的堆栈跟踪:
例外:
org.apache.tiles.TilesException: ServletException including path '/resources/layout/Layout.jsp'.
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:614)
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)
org.apache.struts2.interceptor.ScopeInterceptor.intercept(ScopeInterceptor.java:431)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
根本原因:
org.apache.tiles.util.TilesIOException: ServletException including path '/resources/layout/Layout.jsp'.
org.apache.tiles.servlet.context.ServletTilesRequestContext.wrapServletException(ServletTilesRequestContext.java:298)
org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:200)
org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:179)
org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84)
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606)
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)
org.apache.struts2.interceptor.ScopeInterceptor.intercept(ScopeInterceptor.java:431)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
很难诊断出我真正无法正常工作的东西 - 但我发现Tomcat方面有些不对劲。指定的Layout.jsp文件路径似乎很好 - 但我不能说Tomcat是否看到该文件。如果我删除Layout.jsp,我看到同样的错误。另一方面,有一个名为tiles-config-ext.xml的文件包含:
<definition name="BOMainWindow" template="/resources/layout/Layout.jsp">
<put-attribute name="body" value="something" />
<put-attribute name="leftMenu" value="true" />
<put-attribute name="rightBanner" value="something2" />
</definition>
当我更改模板让我们说Layout2.jsp并在正确的位置创建该文件时 - 我有不同的错误 - 响应404.即使我从绝对的每个文件中删除“Layout.jsp”。