Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > UI Tags > Themes and Templates > Selecting Themes |

Apache Struts 2 Documentation
Selecting Themes
Edit Page Browse Space Add Page Add News
Added by Patrick Lightbody, last edited by Ted Husted on Sep 03, 2006 (view change)

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

1. The `theme` attribute on the specific tag
2. The `theme` attribute on a tag's surrounding form tag
3. The page-scoped attribute named `theme`
4. The request-scoped attribute named `theme`
5. The session-scoped attribute named `theme`
6. The application-scoped attribute named `theme`
7. The `application.ui.theme` property in struts.properties (defaults to xhtml)

## Tips

- To override an entire form's theme, just change the theme attribute for the form. (Convenient for using the ajax theme for select forms.)
- To support user-selected "shttp://confluence.twdata.org/pages/editpage.action?pageId=723#
  Wiki Markupkins", override the theme in the user's session.
- To change the theme for the entire application, modify the struts.properties.