users@servlet-spec.java.net

[servlet-spec users] [jsr340-experts] Re: New API ServletContext#addVirtualHostName

From: Greg Wilkins <gregw_at_intalio.com>
Date: Tue, 26 Feb 2013 12:59:12 +1100

Shing,

Contexts often have multiple virtual names, so I think this method
should have a multi-valued varient:

  Collection<String> getVirtualHostNames();

I think the single valued one is also good as typically there is one
prime name and several aliases.

regards



On 26 February 2013 12:24, Shing Wai Chan <shing.wai.chan_at_oracle.com> wrote:
> There is a typo in the first line.
> I mean "virtual host" rather than "logical host" there.
> Shing Wai Chan
>
>
> On 2/25/13 5:03 PM, Shing Wai Chan wrote:
>>
>> We plan to add the following API in ServletContext.
>> This can be used by other modules, like JASPIC, for the purpose of
>> configuration or registration.
>>
>> /**
>> * Returns the name of the logical host on the server.
>> *
>> * Servlet containers may use virtual hosting to support multiple virtual
>> hosts
>> * sharing one IP address on a server.
>> *
>> * This method must return the same value for all the servlet contexts of
>> a virtual host,
>> * and the value returned by this method must be distinct per virtual
>> host.
>> *
>> * @return a <code>String</code> containing at the name of the virtual
>> host
>> * on which the servlet context is deployed.
>> */
>> public String getVirtualHostName();
>>
>> Please let me know if you have any concern.
>> Thanks.
>> Shing Wai Chan
>
>



-- 
Greg Wilkins <gregw_at_intalio.com>
http://www.webtide.com
Developer advice and support from the Jetty & CometD experts.
Intalio, the modern way to build business applications.