If all your pages inherit from an abstract page, you can do something
like this in the constructor:

WebRequest request = (WebRequest) getRequest();
String serverName = request.getHttpServletRequest().getServerName();

if (serverName.contains("domain2.com")) {
  setLocale(Locale.ENGLISH);
}
if (serverName.contains("domain.com")) {
  setLocale(Locale.FRENCH);
}

etc.

Another possibly good place to put such code is a custom session
class's constructor.

j

2009/12/16 Matthias Howell <[email protected]>:
> Greetings all,
>
> I am exploring porting my web app to Wicket - currently it is in servlets
> with XSLT/XML.
>
> One of my requirements is to support the same app in a single instance
> responding to multiple domain names.
>
> E.g. www.domain1.com/webapp  gets to the app and the app is in English -
> English text, English images.  www.domain2.com/webapp is on the same machine
> but is in French  - all the text and images are in French.
>
> Currently I capture the domain in one of the early filters and put the
> correct "resource map" into the session.
>
> Is this possible in wicket - and how would I go about it.
>
>
> thanks for your time.
>
> Matthias
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to