Here's the problem I keep running up against.

        The top level XML element is a Server, it contains a ContextManager.    The
ContextManager contains both the Connector, which defines the port to listen
on, and the Context entries at the same level.  How do I associate
particular contexts with particular Connectors?  Right now I seem only able
to have one servlet context that maps to "/".  I really should be able to
have two servlets that map to "/", one "/" for port 8080 and one "/" for
port 8081.

        I also want the default servlet mappings turned off so that I am no longer
able to access the servlets as "/webapp_name/" when tomcat starts and finds
a war file named "webapp_name".  I only want Tomcat to serve the servlets
that I setup explicitly in server.xml.

        One way of achieving this in an apache world would be:

NameVirtualHost 10.0.0.1:8080
NameVirtualHost 10.0.0.1:8081

<VirtualHost 10.0.0.1:8080>
    ServerName port8080.domain.com
    DocumentRoot /home/httpd/port8080
    ....
</VirtualHost>

<VirtualHost 10.0.0.1:8081>
    ServerName port8081.domain.com
    DocumentRoot /home/httpd/port8081
    ....
</VirtualHost>


That gives me a different document root for each port.  What I want from
Tomcat is a different servlet to handle requests on each port.

-Bill

> -----Original Message-----
> From: Alex Fernández [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 02, 2001 4:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Assigning Servlets to different ports.
>
>
> Hi William!
>
> Configure two contexts, and load each servlet in one context.
>
> Un saludo,
>
> Alex.
>
> William Wishon wrote:
>
> > Hi,
> >
> >         I am trying to assign one of my servlets (say servlet1)
> to port 8080 and
> > another one (say servlet2) to port 8081.  I want them totally
> separate so
> > that I can't access servlet2 on port 8080 nor servlet1 on 8081.
>  Can anyone
> > help me figure out how to do this?
> >
> > -Bill
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to