Hi all

I'm slowly figuring out the basics of Tiles, and I feel like its a
good solution for my application. I want to make sure before I get to
far that I'm thinking about things the right way.

I have 

1. a login page with a header, body and footer

2. Application itself which will contain a Header, Navigation, Body
and Footer (same Header, and Footer as the login page).

I have created the following directory structure ans JSP layout under
my brand new shiny Struts 1.1 web application under the WebRoot
Directory

\WebRoot
\WebRoot\WEB-INF
\WebRoot\WEB-INF\tiles-defs.xml (listed below)
\WebRoot\jsp
\WebRoot\jsp\images
\WebRoot\jsp\layouts
\WebRoot\jsp\layouts\loginLayout.jsp
\WebRoot\jsp\layouts\siteLayout.jsp
\WebRoot\jsp\tiles
\WebRoot\jsp\tiles\header.jsp (not full html page)
\WebRoot\jsp\tiles\footer.jsp
\WebRoot\jsp\tiles\navigation.jsp
\WebRoot\jsp\loginBody.jsp
\WebRoot\jsp\appPageBody.jsp

Explanation:
\layouts contains my JSP Layouts for the different parts of the app
\tiles contains my reusable areas in the app (not complete html pages)
\jsp contains the different "body" jsp files

My question is : Is this a typical way to arrange a generic Tiles
application? the problem come in when I try to use definition
inheritance in the tiles-defs.xml file. See how in the tiles-defs.xml
I have page.AppStart inheriting from base.definition, but it's using a
DIFFERENT page as a template because the LOGIN page doesnt need
navigation and th application page does...

tiles-defs.xml
<tiles-definitions>
<!-- Base Tiles Definition -->
  <definition name="base.definition" path="/jsp/layouts/loginLayout.jsp">
<put name="header" value="/jsp/tiles/header.jsp" />
<put name="footer" value="/jsp/tiles/footer.jsp" />
  </definition>

<!-- Tiles Definition of login page -->
  <definition name="page.login" extends="base.definition">
<put name="title" value="Login Page" />
<put name="body" value="/jsp/loginBody.jsp" />
  </definition>

<!-- Tiles definition of mail application page-->
  <definition name="page.appStart" extends="base.definition" 
path="/jsp/layouts/siteLayout.jsp">
              <put name="title" value="Application Title" />
<put name="nav" value="/jsp/navigation.jsp" />
<put name="body" value="/jsp/appStartBody.jsp" />
  </definition>
</tiles-definitions>

-- 
-Dave
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to