> In Tomcat 3.3, you can setup two different ContextManager's, so
> each will listen to a
> different port. I believe it should be the same in 3.2.1?

In the configuration I am looking at (for Tomcat 3.2.1) it looks like the
connectors are where the port numbers get assigned.  Is there a port
property that can be set on the ContextManager?  If so do you know how it
interacts with the port settings on the Connectors?  I have been playing
around with multiple ContextManagers each with a TcpPoolConnector with
different port settings and different Hosts with Contexts mapping different
servlets to "/", but I haven't yet found a combination that works for me.
I've even tried giving each ContextManager its own home directory, work dir,
webapps dir, etc.

I'm going to keep fiddling around and looking through the code to see what I
can find, but it you have any more suggestions please post them.

The thing I am looking into now are a few properties of the TcpPoolConnector
that look promising, they are 'vhost_port', 'vhost_name', and
'vhost_address'.  I tried what seemed obvious to me, with no luck.  I have
yet to discover how these settings on the Connector interact with the
Contexts that are part of the Hosts.  In my grep'ing through the source the
only place I've found that looks at these values is
org/apache/tomcat/startup/EmbededTomcat.java, which didn't look promising,
so maybe they are for a feature not yet implemented.

> >         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.
>
> I'm at a loss here. Isn't web.xml the file that sets servlets up?

I figured out how to do that, by removing the AutoSetup ContextInterceptor I
was able to get stop tomcat from installing the webapps it finds
webapps/foo.war into http://host/foo/
This has the other side effect of not automatically exploding war files that
it finds in the webapps directory, but that's fine by me.

> > 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.
>
> With two ContextManager's you should be able to do what you want;
> I haven't tried it,
> though.

One kind message I get when using two ContextManagers are messages about the
removing of duplicate servlets.  Now I have all sorts of debug flags turned
on so they might be harmless, but I don't get the messages with only one
ContextManager.

Thanks,
Bill


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

Reply via email to