Costin,

> If what you want to do is support virtual hosts - tomcat supports
> virtual hosts using a single ContextManager ( the contextManager is a
> representation for a "server" that may have multiple hosts).

I don't mind using virtual hosts, but they don't do what I'm looking for.  I
have two servlets, one provides a public service and the other is the
configuration and administration of that public service.  I want to have the
root "/" of port 8080 go to the publicly available servlet.  Then using
firewalling rules allow access to port 8081 only from the local network.
"/" on port 8081 would go to the administration servlet.  The problem with
virtual hosting as implemented in Tomcat 3.2.1 is that both virtual hosts
and their contexts are available on both ports.  That exposes the
administration functionallity to the public and I don't want that.

>
> There is no special representation for Host ( as a top-level object ) -
> each Context belongs to a virtual host, and the mapper is routing the
> requests. You can add additional modules to filter or do other tricks.
> ( just use Context.getHost() or getHostAliases() ).
>
> If you want to isolate applications/hosts - using separate VMs may give
> you more benefits.

I can't use multiple VM's because the administration servlet 'talks' to the
other servlet by changing it's in memory configuration.


Ideally what I am looking for is something like:

<Context path="/" docBase="/webapps/PublicService" port="8080">
<Context path="/" docBase="/webapps/AdminService" port="8081">

I'm begining to think I could modify (or subclass) Context.java to have a
port property, then create a new mapper like SimpleMapper1 that looks at the
request and looks at the contexts port property and enforces the separation.
Does that sound about right?

> IMHO if what you want to do requires changes/fixes in tomcat, you should
> try tomcat 3.3, where it is still possible to do this kind of change
> ( assuming it's not too big ). For 3.2.2 I don't think this can be
> clasified as a critical bug, and I don't think Marc would enjoy it :-)

I'm not trying make any more work for anyone else, I'm just trying to get
some advice on how the code works and where to begin my changes.  Because
stability is important to me I am more willing to make a (hopefully small)
patch against 3.2.1 than to 'upgrade' to the more unstable 3.3 code.  I
would, however, be willing to back port some changes if 3.3 had this
functionallity, but from what I could gather 3.3 is also missing this
ability.

-Bill


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

Reply via email to