I am having an issue getting Tiles to work.  I am totally new to Struts
so bear with me.  The issue is I don't see anything.  I got to home.do
(which is set up as what the user will see first) and it is totally
blank and the source is totally empty.  I think I have everything in my
configuration correct but don't know what to do.  Here are my files:

 

/WEB-INF/tiles-def.xml:

 

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE tiles-definitions PUBLIC

       "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"

       "http://struts.apache.org/dtds/tiles-config_1_3.dtd";>

 

<tiles-definitions>

      <definition name="baseDef" path="/layout/layout.jsp">

            <put name="pageTitle" value="Kentucky Academy of Technology
Education" />

        <put name="header" value="/layout/header.jsp"/>

        <put name="nav" value="/layout/nav.jsp"/>

        <put name="footer" value="/layout/footer.jsp"/>

        <put name="body" value=""/>

    </definition>

    

      <definition name="homeDef" extends="baseDef">

            <put name="pageTitle" value="KATE : WORM : Home" />

        <put name="body" value="/pages/homeBody.jsp"/>

    </definition>

</tiles-definitions>

 

/layout/layout.jsp:

 

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>

<%@ taglib uri="/tags/struts-html" prefix="html" %>

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

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

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";>

      <head>

            <title><tiles:insert attribute="pageTitle"/></title>

            <link href="layout/katemain.css" rel="stylesheet"
type="text/css" /> 

      </head>

      

      <body>

      

      <!-- Begin Container -->

      <div id="container">

            

            <!-- Begin Banner Bar with Search -->

            <div id="banner">

                  <%-- include header --%>

                  <tiles:insert attribute="header"/>

                  <p class="toptext"></p>

            </div>

            <!-- End Banner Bar with Search -->

            

            <!-- Begin Left Navigation -->

            <div id="left">

                  <%-- include navigation --%>

                  <tiles:insert attribute="nav"/>

            </div>

            <!-- End Left Navigation -->

 

            <!-- Begin Middle Content -->

            <div id="center">

                  <div id="content">

                        <%-- include body --%>

                  <tiles:insert attribute="body"/>

                  </div>

            </div>

            <!-- End Middle Content -->

            

            <!-- Clear the left floats so that the footer will appear
correctly -->

            <div class="clearer"></div>

      

            <!-- End Clear the left floats so that the footer will
appear correctly -->

            

            <!-- Begin Footer -->

            <div id="footer">

                  <%-- include footer --%>

                  <tiles:insert attribute="footer"/>

            </div>

            <!-- End Footer -->

            

      </div>

      <!-- End Container -->

      

      </body>

</html>

 

I have these in my /WEB-INF/struts-config.xml file:

 

<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

<plug-in className="org.apache.struts.tiles.TilesPlugin" >

            <set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />

            <set-property property="moduleAware" value="true" />

</plug-in>

 

Can someone point me in the right direction?

 

Thanks,

 

Seth Buntin

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University

 

Reply via email to