Internal redirection to tomcat from IIS 7.0?
I am running some sites on IIS 7.0. But yesterday one of my client asked me to host a Java website. I can't host that website directly so I installed tomcat server on port 开发者_Python百科8080. Whenever a browser send a request for that website, it should redirect to my tomcat internally. The client URL should not be updated.
I was originally going down the same route as James but there is a much better (and for some reason less known) way.
Since you are running IIS7 you can setup Microsoft Application Request Routing. This will allow you to create a proxy from IIS to Tomcat. Here is a walk through on a blog. I have an example on my blog showing you how you can host multiple sites in IIS and route traffic based on the host header name. I did have a link to another blog but this is no longer available.
You need to use the Tomcat IIS connector. IIS will accept the request from the web browser, send it on to Tomcat, get the response from Tomcat and send it back to the web browser
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
精彩评论