users@glassfish.java.net

Re: subdomain in glassfish

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 18 Mar 2010 09:29:24 -0700

glassfish_at_javadesktop.org wrote:
>> glassfish_at_javadesktop.org wrote:
>>
>>> Hi
>>>
>>> I want to set up a virtual server for subdomain
>>>
>>> my domain is redirected from
>>> pradyut.dyndns.org
>>>
>>> to pradyut.dyndns.org/WebApplicationSecurity
>>>
>>> using a virtual server whose default web module is
>>> WebApplicationSecurity
>>> I have used the string
>>>
>> "${com.sun.aas.hostName},pradyut.dyndns.org"
>>
>>> in the hosts of the virtual server
>>>
>>> now to the question
>>> if someone enters "newa.pradyut.dyndns.org"
>>> how can i redirect to
>>>
>>> pradyut.dyndns.org/WebApplicationSecurity/newa
>>>
>>> or [b]"*.pradyut.dyndns.org"[/b]
>>> redirects to
>>>
>> pradyut.dyndns.org/WebApplicationSecurity[b]/*[/b]
>>
>>>
>>>
>> Unfortunately, we don't support wildcards in domain
>> names, which means
>> you will have to list all possible subdomains.
>> I remember a similar request having been filed in the
>> past. I agree it
>> would be useful to support this feature.
>>
>> Please file an enhancement request at
>> https://glassfish.dev.java.net/servlets/ProjectIssues
>>
>> Thanks!
>>
>>
>
> I have put enhancement issue
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11697
>
>

Thanks!
> well to the question, so how can I it individually....
>
> if someone enters "newa.pradyut.dyndns.org"
> how can i redirect to
>
> pradyut.dyndns.org/WebApplicationSecurity/newa
>

You could write a Filter that retrieves the host name from the
ServletRequest (by calling ServletRequest#getServerName) and issues a
redirect as appropriate. You would bundle this Filter with your
"WebApplicationSecurity" application.


Jan

> Thanks
>
> Pradyut
> India
>
>
>> Jan
>>
>>> Thanks
>>> Pradyut
>>> [Message sent by forum member 'pradyut']
>>>
>>>
>>>
>> http://forums.java.net/jive/thread.jspa?messageID=3924
>> 26
>>
> [Message sent by forum member 'pradyut']
>
> http://forums.java.net/jive/thread.jspa?messageID=392496
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>