((WebRequest)RequestCycle.get().getRequest()).getRequestURL() should work for you.
** Martin 2009/2/23 Wayne Pope <[email protected]>: > Hi Martin, > > basically I need subdomains to map to a context within the application. > > For example if you have a application that has several customers, I > want to have a separate subdomain for each customer: > > william.myapp.com > jo.myapp.com > sarah.myapp.com > > I'd like 'william' to always see his URLS like: > http://william.myapp.com/?wicket:interface=:4:::: > > > However in the application I need to figure out that I'm in the > 'william' context, so i can serve williams content only. > > > > > On Mon, Feb 23, 2009 at 5:00 PM, Martin Makundi > <[email protected]> wrote: >> I think you can see the request ulr root by calling >> ((WebRequest)RequestCycle.get().getRequest()).getRequestURL() >> >> Is that what you want? >> >> ** >> Martin >> >> 2009/2/23 Wayne Pope <[email protected]>: >>> Hi, >>> >>> I need to be able to map urls like: >>> >>> foo.myapp.com >>> foo2.myapp.com >>> woo.myapp.com >>> etc.. >>> >>> and be able to have a parameter in my session (say a String) set to >>> either foo, foo2, woo, etc >>> >>> These subdomains are database driven and therefore I don't want to add >>> any subdomains hardcoded to web.xml or apache . >>> I was thinking about doing a mod rewrite in apache and either >>> appending an extra parameter or mapping to something like: >>> >>> /webappurl/foo >>> /webappurl/foo2 >>> /webappurl/woo >>> >>> and then (by majic!) be able to pick this up in the wicket session. >>> >>> Anyone got any idea's on how I could go about this? >>> >>> I did think about adding another servlet filter and setting some >>> threadlocal variable, but this doesn't feel right. >>> >>> many thanks >>> >>> --------------------------------------------------------------------- >>> 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] >> >> > > --------------------------------------------------------------------- > 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]
