Since we are using Struts ( http://jakarta.apache.org/struts/ ) and Tiles ( http://www.lifl.fr/~dumoulin/tiles/ ) requires that our application directory structure is not as clear is if we just used straight JSPs or Servlets. However, this structure provides the application with overall better semantics, mantainability, and modifiability. This document is designed to serve as a reference to developers working on the HOME project. If you are a developer, than you don't need to read this page.

Directory Structure Summary

Here is a summery of all the directories used in the application. There are two directory structures. The first is the development structure which is the structure in which the source code is maintained. The second is the deployed application directory structure (or the runtime directory structure). The deployment directory structure will not exist until you build the application. It is important have a good understanding of both structures, as you will need to create references to both when referring to layouts and other Tile related stuff.

Developement Directory Structure

NOTE: all of the directories that make up the development directory structure have ./home/webapp/ as their parent directory, where /home is the base CVS repository directory, wherever that may be on your system.

Directory Description
web/ Anything that we want the end user to access directly goes here. This includes any jsp's that do not call any Action Class's.
web/styles/ Contains all the Cascading Style Sheets for the application.
web/images/ Contains all the images for the application.
etc/ Contains the struts-config.XML and the web.XML files for configuring the web application.
etc/pages/ Any JSPs that we don't want the end user to have direct access to, we put here.
etc/pages/common/ All the JSPs in this directory are common Tiles used by a lot of pages in the Application.
etc/pages/layouts/ All the Tile Layout JSPs go here.
etc/pages/bodies/ All the main content pieces of a JSP utilizing Tiles goes here. For example, the body of the index.jsp page would go here.
etc/classes/ All pre-compiled classes not part of a JAR file that our application uses go here.
src/edu/messiah/cs/home/struts/ All Java source Code for Beans and Servlets go here.
lib/ Any libraries that the application depends on go here. This includes JAR files, TLD files, and DTD files.

Deployment Directory Structure

NOTE: all of the directories that make up the deployment directory structure have $TOMCAT_HOME/webapps/home as their parent directory.

./ Main web application directory. All the JSPs that are accessible by the end user end up here.
styles/ Contains all the Cascading Style Sheets for the application.
images/ Contains all the images for the application.
javadoc/ Contains any and all javadoc generated files.
WEB-INF/ Anything that the user does not have direct access to goes here. In this base directory, you will find the struts-config.XML and web.XML files as well as any and all .tld files that the application uses.
WEB-INF/classes/edu/messiah/cs/home/struts Compiled Java code (class files) for Servlets and Beans end up here.
WEB-INF/lib/ Any libraries that the application depends on end up in here. This is where you will find all the JAR files.
WEB-INF/pages/ Any JSPs that we don't want the end user to have direct access to end up here.
WEB-INF/pages/common/ All the JSPs in this directory are common Tiles used by many of pages in the Application.
WEB-INF/pages/layouts/ All the Tile Layout JSPs end up here.
WEB-INF/pages/bodies/ All the main content pieces of a JSP utilizing Tiles end up here. For example, the body of the index.jsp page would end up here.
Valid XHTML 1.0! Valid CSS!
Page Execution took real: 2.335, user: 1.870, sys: 0.050 seconds