0 Replies Latest reply on Oct 29, 2013 8:56 AM by David Baddeley

    Set locale based on domain mapping

    David Baddeley Newbie



      I have a SEAM 2.2.2 App running on JBoss AS6


      The App is setup with a number of languages (English and Swedish)


      In the JBoss deploy directory /jbossweb.sar/server.xml I have mapped a number of different domains using the following Host entries


      <Host name="processor">
        <Valve className="org.apache.catalina.valves.AccessLogValve"
        prefix="processor" suffix=".log" pattern="common"
        <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
        transactionManagerObjectName="jboss:service=TransactionManager" ></Valve>


      We need to be able to ensure that all visitors who land on www.myapp.sv have the default language set to swedish (I know this breaks usability rules but not my decision)


      What would be the best way to achieve this? My initial guess would be to check which locale is set when the page is requested then use the localeSelector to override the default set by the browser but this seems like a bit of a hack and potentially wasteful as the resource bundles would need to be reloaded twice?


      Is there anything 'built-in'  to SEAM/Jboss that I can use to do this?