jQuery in Action, 3rd edition
The moose likes Tomcat and the fly likes Tomcat config issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat config issue" Watch "Tomcat config issue" New topic

Tomcat config issue

Jeremy Botha
Ranch Hand

Joined: Feb 16, 2005
Posts: 125
I'm in the process of speccing up a content management system for a private client. The client wants to be able to offer small business website hosting, and has approached me to write the CMS etc. No issues there.

What I want to do is write one web application, with the ability to dynamically add sites (within reason, I know one has to set up virtual hosts and the various DNS entries as well, but I want to try to automate the process as far as possible.)

What currently has me stumped is the following.

I want to deploy the CMS and backing system as www.blah.com

Now say my client signs another client, test.com. I want to be able to serve up test.com's website and CMS data from the main application servlet on blah.com.

I know that tomcat has support for Aliases inside the Host element in server.xml - but I'm hoping that someone here knows whether I can register an alias, say www.test.com, which Tomcat will automatically be able to redirect to say www.blah.com/main?site=<siteID> or something to that effect.

What I've seen so far is that I can run www.test.com and www.blah.com off the same webapp via Alias, but I can't find a way to encode the site id of www.test.com in the alias itself.

In effect, I want the site www.test.com to transparently use www.blah.com to serve its data.

Is this possible?

Mods - sorry if this is the wrong section, I thought that 'Servlets' would give me the best chance of finding answers.

thanks in advance

McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
I agree. Here's the link: http://aspose.com/file-tools
subject: Tomcat config issue
It's not a secret anymore!