Although it's true that domain.com is the top level domain, and www.domain.com
is a subdomain of domain.com, they are still both valid domains and
potentially point to different servers. Accordingly, they should be
treated separately. If they should really be treated the same, I
suggest using apache to do appropriate url rewriting/forwarding so
that requests to domain.com are always sent to www.domain.com (or vice
versa, but typically domain.com is rewritten to www.domain.com).
Alternatively, you could use the URLRewriting support built into
tapestry 5.1 to do ensure that your application always sees one or the
other domain, and that all links are written accordingly.
Although www.domain.com and domain.com often point to the same server,
there's no reason they have to. www is just another subdomain (albeit
with a standard implication). Would you want to ignore the difference
between appA.domain.com and appB.domain.com?
Robert
On Jun 8, 2009, at 6/89:47 PM , Angelo Chen wrote:
Hi,
using Request getServerName, it returns 'www.example.com' or
'example.com'
depending on the url, what is the function that will return only the
domain
name? in this case example.com.
Thanks,
--
View this message in context:
http://www.nabble.com/T5%3A-getting-domain-name-tp23935537p23935537.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org