简体   繁体   English

在没有上下文路径的情况下访问Java应用程序

[英]Accessing the Java application without context path

We need to have a context path to deploy the Java application and access it through the browser. 我们需要一个上下文路径来部署Java应用程序并通过浏览器访问它。 We have nearly 10 applications on Oracle Application server. Oracle应用服务器上有近10个应用程序。 We would like to work our applications without context path. 我们希望在没有上下文路径的情况下工作我们的应用程序。 ie; we would like the application server to look at the corresponding application based on the domain name. 我们希望应用服务器根据域名来查看相应的应用。

I know this can be done as Google app engine is doing the same when users deploy their applications. 我知道可以做到这一点,因为当用户部署其应用程序时,Google应用程序引擎也会这样做。 Context path of these application will be just "/". 这些应用程序的上下文路径将仅为“ /”。

Any ideas on setting this up on Oracle app server? 关于在Oracle应用服务器上进行设置的任何想法?

I'm assuming that the Oracle Application Server being referred to, is the older Oracle Containers for Java (OC4J). 我假设所指的Oracle应用服务器是较旧的Java Java容器(OC4J)。

With OC4J, you'll need to put OHS (Oracle HTTP Server) or any compatible HTTP Server (Apache 1/2 works) in front of OC4J, and configure the HTTP Server to forward requests to OC4J (there are mod_oc4j plugins available for the same). 使用OC4J,您需要将OHS(Oracle HTTP Server)或任何兼容的HTTP Server(Apache 1/2作品)放在OC4J的前面,并配置HTTP Server以将请求转发到OC4J(有可用的mod_oc4j插件可用于相同)。 Additionally, you'll have to configure the HTTP Server to serve multiple virtual hosts. 此外,您必须配置HTTP服务器以服务于多个虚拟主机。

The same information holds good even for Oracle WebLogic Server. 即使对于Oracle WebLogic Server,相同的信息也适用。

You can find more information on the same in Oracle HTTP Server Administrator's Guide. 您可以在《 Oracle HTTP Server管理指南》中找到有关此内容的更多信息。 The guide to version 10.1.3.1 is available here ; 版本10.1.3.1的指南可在此处获取 you might need to determine the appropriate version of OHS for your version of OC4J/WLS. 您可能需要为OC4J / WLS版本确定合适的OHS版本。

You could ask additional questions on OHS/Apache configuration on ServerFault . 您可以在ServerFault上询问有关OHS / Apache配置的其他问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM