[英]Exposing Java web application via IIS through ISAPI or URL rewrite
I want to expose a Java application via IIS. 我想通过IIS公开Java应用程序。 I found an answer in Running a java web application in IIS that refers to the isapi redirector . 我在运行IIS中引用isapi重定向器 的Java Web应用程序时找到了一个答案。 However what also seems to work for me is to set up IIS URL rewriting rules. 但是,对我来说似乎还行得通的是设置IIS URL重写规则。 Eg I have set up a rewrite rule that matches ^java/(.*)
and rewrites it to http://localhost:8080/{R:1}
例如,我设置了一个匹配^java/(.*)
的重写规则,并将其重写为http://localhost:8080/{R:1}
I am a programmer and not a web server administrator, so I do not understand the implications of one versus the other. 我是一名程序员,而不是Web服务器管理员,所以我不理解一个与另一个相对的含义。 Which is the preferred approach and why? 首选方法是什么,为什么? URL rewriting seems simpler to setup since it involves less 'moving parts' and less configuration. URL重写似乎更易于设置,因为它涉及较少的“活动部件”和较少的配置。
In my experience I've had to use the ISAPI redirector when the following conditions are met: 以我的经验,当满足以下条件时,我必须使用ISAPI重定向器:
If you don't have to meet any of these conditions, and if Company/System policy doesn't enforce that all requests go through IIS, then a URL rewriting rule is probably OK. 如果您不必满足这些条件中的任何一个,并且如果公司/系统策略不强制所有请求都通过IIS,则URL重写规则可能是可以的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.