How can I use Tomcat behind IIS?

How can I configure Tomcat 3.2 with my IIS server so I don’t have to use http://localhost:8080?
Answer:The documents under Tomcat’s doc directory describe how you can configure Tomcat the way you want, but here’s a brief answer.If all you want is to avoid specifying the port number, you can just tell Tomcat to use port 80 instead of port 8080. You can change this in the conf/server.xml file:

<!-- Normal HTTP -->
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler"
  value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port"
  value="80"/>
</Connector>

After you make this change and restart Tomcat, you can use a URL like http://localhost/ instead. Note that if you try this on a Unix/Linux system, you must start Tomcat as “root”, which may be a security risk. On Windows, however, you can use port 80 from any login account.

The only reason for running Tomcat behind IIS that I can think of is if you need to serve both JSP pages and dynamic content based on other non-Java technologies (ASP, CGI, etc). You can read more about how to use Tomcat with IIS in doc/tomcat-iis-howto.html.

Leave a Reply

Your email address will not be published. Required fields are marked *