Hello, Knowing that the format will always be [anything.]domain[.tld], can't you just check if any periods exists? If 0 or 1, you can just use what the method returned, otherwise just substring it.
On Mon, Jun 8, 2009 at 10:47 PM, Angelo Chen <angelochen...@yahoo.com.hk>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 > >