5 Replies Latest reply on May 8, 2008 7:03 PM by Jason Long

    Where to put the Facelets templates when my app xhtml's are in subdirectories

    Dick Starr Newbie

      In all of the example apps and Seam Gen apps the xhtml's are in a single view directory as follows:

        all of the app's xhtml files

      Everything beneath the view directory ends up in the root of the app.war file.

      Instead of all of the app's xhtml files in a single directory I want to organize the app xhtml files in subdirectories, but I don't want to have to do this in one xhtml:

      <ui:composition ... template="../layout/template.xhtml">

      and then do this in another xhtml when I am one directory deeper

      <ui:composition ... template="../../layout/template.xhtml">

      I have read on the web that it's OK to put your templates under /WEB-INF/ to address this problem. However, I was wondering:

      (1) Why don't any of these example apps organize their xhtml files in subdirectories? It makes me think I am missing something and that all the app's xhtmls should all be in the same directory.

      (2) If using subdirectories for the app xhtml's then where is the best place to put the img, layout, and stylesheet directories so they will be found?

      I am new to Seam, and am using jboss-4.2.2.GA and jboss-seam-2.0.1.GA in an EJB3 application.

      Thanks in advance.

      Dick Starr