For a multi-locale Oracle ATG Web Commerce web site, include a single top-level index.jsp page as an entry page for all users. Use a Switch servlet in this page to check the language setting of the user’s request locale object (RequestLocale.locale.language) and then redirect the request to the index page of the matching language directory. For example, if a user chooses French on the registration page, thereby setting the request’s language property to fr, he or she is redirected to the index page in the French directory.

This example shows the Switch servlet from the top-level index.jsp file in the Quincy Funds demo:

<dsp:setvalue bean="/atg/dynamo/servlet/RequestLocale.refresh" value=" "/>
<dsp:droplet name="/atg/dynamo/droplet/Switch">
  <dsp:param bean="/atg/dynamo/servlet/RequestLocale.locale.language"
    name="value"/>
  <dsp:oparam name="fr">
      <dsp:droplet name="/atg/dynamo/droplet/Redirect">
        <dsp:param name="url" value="fr/index.jsp"/>
      </dsp:droplet>
 </dsp:oparam>
  <dsp:oparam name="de">
      <dsp:droplet name="/atg/dynamo/droplet/Redirect">
        <dsp:param name="url" value="de/index.jsp"/>
      </dsp:droplet>
 </dsp:oparam>
  <dsp:oparam name="ja">
      <dsp:droplet name="/atg/dynamo/droplet/Redirect">
        <dsp:param name="url" value="ja/index.jsp"/>
      </dsp:droplet>
 </dsp:oparam>
  <dsp:oparam name="en">
      <dsp:droplet name="/atg/dynamo/droplet/Redirect">
        <dsp:param name="url" value="en/index.jsp"/>
      </dsp:droplet>
 </dsp:oparam>
   <dsp:oparam name="default">
      <dsp:droplet name="/atg/dynamo/droplet/Redirect">
        <dsp:param name="url" value="en/index.jsp"/>
      </dsp:droplet>
</dsp:oparam>
</dsp:droplet>