How to switch back to default theme, if user specified theme property file is not present in application?
<p>I have 3 theme property files:-
1) theme-fr_CA
2) theme-fr_US
3) theme-en_US</p>

<p>In my spring application based on user locale theme is applied. but, my problem is if there is some unknown locale like 'ch_RS' then I want be fall back to theme belonging to en_US locale that is theme-en_US file.</p>

<p>Please find the below code:-</p>

<pre><code>    &lt;bean id="themeSource"
      class="org.springframework.ui.context.support.ResourceBundleThemeSource"&gt;
    &lt;property name="basenamePrefix" value="theme-" /&gt;
&lt;/bean&gt;

&lt;bean id="themeResolver"
  class="org.springframework.web.servlet.theme.CookieThemeResolver"&gt;
    &lt;property name="defaultThemeName" value="en_US" /&gt;
&lt;/bean&gt;
</code></pre>

<p>How can I achieve this? Help very much appreciated.</p>