You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Williams, Jim" <jw...@litle.com> on 2006/07/31 22:41:59 UTC

configuring 2 servlets on different ports

can anybody tell me if it is possible to configure 2 servlets so that
they are only available on separate ports 

within the same tomcat instance?

 

I'm using tomcat 5.5, and tried creating 2 services, each with a
connector that used a different port.

Whatever I try for the context within these services, it appears as if
both servlets are available on 

both ports.

 

Is there a magic combination of Context elements that would allow this?

 

Thanks,

 

Jim Williams 
 
 
 
NOTICE:  This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle & Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message.  If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail.  Thank you. 

Re: configuring 2 servlets on different ports

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jim,

> I'm using tomcat 5.5, and tried creating 2 services, each with a 
> connector that used a different port.
> 
> Whatever I try for the context within these services, it appears as
> if both servlets are available on both ports.
>  
> Is there a magic combination of Context elements that would allow this?

I think you'd need separate web.xml files for each context: one that
maps only servlet #1 and one that maps only servlet #2. But that means
that you aren't using the same exact configuration for both contexts,
which might be a deal-breaker for you.

-chris