I would like to build a simple servlet such that when a user visits my website with a subdomain of their choosing 1 of 2 things happens.
If a user tries to visit a sub-domain that has not been "set" I present them a form with a prompt that says...
Welcome to Domain.com!
I noticed you were trying to visit foo.domain.com. No information has been set for subdomain foo. You can set it by submitting a URL in the form below.
URL: <textfield> <submit button>
If, however, the servlet does have information about the subdomain, it forwards off to the URL.
Is it possible to setup a Host and context to provide this functionality in a servlet? How would I setup server.xml such that the subdomain would be provided to the servlet correctly? I have tried to setup up <Host name="*.domain.com"... as well as use <Alias>*.domain.com</Alias>, similar to what I do in Apache... but the server name is always truncated to domain.com.
Any help would be appreciated, Tyler
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]