当前位置: 代码迷 >> J2EE >> 急请问Struts2中tiles的错误有关问题
  详细解决方案

急请问Struts2中tiles的错误有关问题

热度:171   发布时间:2016-04-22 02:36:38.0
急!请教Struts2中tiles的异常问题!
使用MyEclipse8.0中自带的Struts2和tiles,运行后,提示异常:org.apache.tiles.util.TilesIOException: ServletException including path '/layouts/Base.jsp'.这个问题该如何解决??

tiles.xml文件:
XML code
    <definition name="baseLayout" template="/layouts/Base.jsp">    <put-attribute name="title" value="Struts School"/>    <put-attribute name="bodyBackground" value="/images/background.jpg"/>    <put-attribute name="logo" value="/images/logo.jpg"/>    <put-attribute name="menu" value="/tiles/Menu.jsp"/>    <put-attribute name="body" value="/tiles/Body.jsp"/>    <put-attribute name="footer" value="/tiles/Footer.jsp"/>  </definition>    <definition name="homePage" extends="baseLayout">    <put-attribute name="body" value="/tiles/HomeBody.jsp"/>    </definition>


struts.xml中的定义:
XML code
    <action name="home" class="com.mytracks.actions.Home">      <result name="success" type="tiles">homePage</result>    </action>


web.xml中有关定义:
XML code
  <context-param>    <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>    <param-value>/WEB-INF/tiles.xml</param-value>  </context-param>     <listener>     <listener-class>         org.apache.struts2.tiles.StrutsTilesListener     </listener-class>   </listener>


------解决方案--------------------
结贴吧!
  相关解决方案