tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Michaels <>
Subject Re: How to serve .net and java websites on Windows 2008 with IIS7 and Tomcat
Date Wed, 02 Feb 2011 00:51:51 GMT
A simple answer to your question is to create additional <Host> entries 
to your Tomcat server.xml file. While I know that there are some on this 
list who disagree with this method, I personally find that configuring 
hosts and contexts in the server.xml file very simple as it makes adding 
new hosts to Tomcat similar to adding new hosts in Apache.

For example, you can add the following to your server.xml file:

         <Host name="[ENTER DOMAIN NAME]" appBase="webapps"
              unpackWARs="true" autoDeploy="true"
              xmlValidation="false" xmlNamespaceAware="false">
              <Context path="" docBase="[ENTER SYSTEM PATH]" />
              <Alias>[ENTER ALTERNATE DOMAINS]</Alias>

or... more specifically:

         <Host name="" appBase="webapps"
              unpackWARs="true" autoDeploy="true"
              xmlValidation="false" xmlNamespaceAware="false">
              <Context path="" docBase="C:\website1\" />

And Tomcat will now know how to resolve each domain to it's own 
directory rather then inside the ROOT webapp.

There are other ways to configure contexts, which I'm sure folks will 
post about subsequently, but I've found this works quite well and 
whether it's the "proper" way to do it or not, it will solve your problem.


On 02/01/2011 04:38 PM, Conway Liu wrote:
> Hi,
> We are trying to setup a webserver that will serve multiple aspx (..Net) websites
> and and jsp (Java) websites.
> The webserver is a Windows 2008 R2 64 bit machine with IIS7.
> I have also installed Tomcat 6.0.30 running as a service. The sample web
> application works with no problem on http://localhost:8080
> Multiple IP addresses have been created on the webserver, so that each IP
> address will be used for one website.
> All websites should be running on port 80, regardless if aspx website or jsp
> website.
> I believe to achieve this, we need to use the Tomcat connector for IIS, so that
> IIS will take the request and forward to Tomcat to server jsp pages.
> I have gone through
> and
> and successfully got IIS7 to pass request to Tomcat and served the sample jsp
> pages on port 80.
> Then I'm stuck...
> It seems like the Tomcat service only serves applications from one location
> But we don't want to run the website as
> Instead, we need to run them as
> which is why we have created multiple IP addresses on the server.
> And the jsp websites will sit in seperate physical folders on the server, for
> example:
> C:\website1\
> C:\website2\
> I've tried to play around with,, but
> without success.
> I think there's something to do with $CATALINA_BASE that I need to configure,
> but I don't know how.
> So now I beg to know exactly what and how to configure for both jsp websites to
> be served by the Tomcat service, receiving request from IIS7.
> If you can give as much detail as possible or point me to any websites that have
> detailed information on this matter, I am forever greatful.
> Regards and thanks
> Conway

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message