The question's more of a general one to help me understand some elements in
server.xml. Maybe I'll start with this question first, though:

If you somehow have multiple contexts (within the same Host or Service, or
within different ones in your Tomcat instance) that point to the same WAR
file or docBase, are there multiple "instances" of that web application
running, or are the multiple entry points to that application (based on it
being specified in multiple hosts) really pointing to the same instance of
that webapp?

If this doesn't make sense, I can clarify. Thanks.



Caldarale, Charles R wrote:
> 
>> From: lightbulb432 [mailto:[EMAIL PROTECTED] 
>> Subject: Port-based virtual hosting
>> 
>> Is there any functional difference between the two
>> options - if they're both even possible? Which would
>> you go with?
>> 
>> - 1 Service element with 5 HTTP connectors (each on a 
>> different port) and one Engine with 5 Hosts
>> (<Host name="application.com:8080">, <Host
>> name="application.com:8081">, etc...)
>> 
>> - 5 Service elements, each with 1 HTTP connector and one 
>> Engine with only 1 Host
> 
> Not sure I understand your requirements.  Are you trying to implement
> multiple virtual hosts that are segregated by port number rather than
> DNS name?
> 
> Your first option is not likely to work, since the port number is
> stripped off before comparison with the <Host> name is done.  (Also,
> since the <Host> name is used as a directory name in the underlying file
> system, the colon won't be allowed on many platforms.)
> 
> The first option would use less resources than the second one, but I
> think it would require that you write a <Valve> to forward each request
> to the proper <Host>.  I think the second one will work without any
> additional coding (but I haven't tried it).
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Port-based-virtual-hosting-tf3970665.html#a11281403
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to