Hi everyone,

I am trying to configure Struts 2 version 2.0.12 and Tiles 2.

When i call an action that uses tiles, i am getting this exception:

javax.servlet.ServletException: Error including path
'/WEB-INF/layout/common.jsp'. org/apache/tiles/ListAttribute

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)


common.jsp is the file that contains the tiles tamplate, here is that file:

<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
    <body>
        <table>
            <tr>
                <td>
                    <tiles:insertAttribute name="header" />
                </td>
            </tr>
            <tr>
                <td>
                    <tiles:insertAttribute name="body" />
                </td>
            </tr>
            <tr>
                <td>
                    <tiles:insertAttribute name="footer" />
                </td>
            </tr>
        </table>
    </body>
</html>

also, here is my tiles.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config_2_0.dtd";>

<tiles-definitions>
    <definition name="home.layout" template="/WEB-INF/layout/common.jsp">
        <put name="title" value="Panorama Grid Console"/>
        <put name="header" value="/WEB-INF/layout/header.jsp"/>
        <put name="body" value="/WEB-INF/view/home.jsp"/>
        <put name="footer" value="/WEB-INF/layout/footer.jsp"/>
    </definition>
</tiles-definitions>

i have tried with put and put-attribute and i am getting the same exception
for both of them.

Finally, here is my web.xml

<web-app id="PanoramaGridConsole" version="2.4" xmlns="
http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

    <!-- Struts 2 Filter -->
    <filter>
        <filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <!-- Struts 2 Filter Mapping -->
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <!-- Struts 2 Tiles Listener -->
    <listener>

<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    </listener>

</web-app>

Am i missing something? is this a bug related to struts 2??? Anyone have
seen this before?

Thanks in advance,

-- 
Carlos Curotto

Reply via email to