我有非常复杂的程序要运行。我不希望任何人深入分析,但也许有人有类似的问题或有诊断提示。应用程序正在使用 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”。