Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > UI Tags > Themes and Templates > Selecting Template Directory
Added by tm_jee, last edited by Ted Husted on Sep 03, 2006  (view change)

Template directory can be selected using several different rules, in this order:

  1. The templateDir attribute on the specific tag
  2. The page-scoped attribute named templateDir
  3. The request-scoped attribute named templateDir
  4. The session-scoped attribute named templateDir
  5. The application-scoped attribute named templateDir
  6. The struts.ui.templateDir property in struts.properties (defaults to template)

Tips

  • To support user-selected "shttp://confluence.twdata.org/pages/editpage.action?pageId=723#
    Wiki Markupkins", override the template directory in the user's session.
  • To change the template directory for the entire application, modify the struts.properties.