bea weblogic HttpClusterServlet配置

本文详细介绍了HttpClusterServlet的配置参数及其用途,包括defaultServers、secureProxy等,并提供了一个示例部署描述符web.xml,展示了如何设置这些参数来实现集群代理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

每次都要查这个配置,先贴过来

Table 8-3 HttpClusterServlet Parameters

<param-name>

<param-value>

Default Value

defaultServers

(Required) A list of host names and port numbers of the servers to which you are proxying requests in the form:

host1:HTTP_Port:HTTPS_Port|
host2:HTTP_Port:HTTPS_Port

(Where host1 and host2 are the host names of servers in the cluster, HTTP_Port is the port where the host is listening for HTTP requests, and HTTPS_Port is the port where the host is litening for HTTP SSL requests.)

Separate each host with the | character.

If you set the secureProxy parameter to ON (see the secureProxy entry) The HTTPS port uses SSL between the WebLogic Server running HttpClusterServlet and the WebLogic Servers in the cluster. You must always define an HTTPS port, even if you have set secureProxy to OFF.

None

secureProxy

ON/OFF. If set to ON, enables SSL between the HttpClusterServlet and the member of a WebLogic Server cluster.

OFF

DebugConfigInfo

ON/OFF. If set to on, you can query the HttpClusterServlet for debugging information by adding a request parameter of ?_WebLogicBridgeConfig to any request. For security reasons, it is recommended that you set this parameter to OFF in a production environment.

OFF

connectionTimeout

The amount of time, in seconds, that a socket waits in between reading chunks of data. If the timeout expires, a java.io.InterruptedIOException is thrown

0 = infinite timeout.

numOfRetries

Number of times HttpClusterServlet will attempt to retry a failed connection.

5

pathTrim

String to be trimmed from the beginning of the original URI.

None

trimExt

The file extension to be trimmed from the end of the URI.

None

pathPrepend

String to be prepended to the beginning of the original URL, after pathTrim has been trimmed, and before the request is forwarded to a WebLogic Server cluster member.

None

Sample Deployment Descriptor for the HttpClusterServlet

The following is a sample of a Web Applications deployment descriptor, web.xml, for using the HttpClusterServlet:

Listing 8-5 Sample web.xml for Use with HttpClusterServlet

 

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.
//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

<web-app>

<servlet>
  <servlet-name>HttpClusterServlet</servlet-name>
    <servlet-class>
      weblogic.servlet.internal.HttpClusterServlet
    </servlet-class>

  <init-param>
    <param-name>defaultServers</param-name>
    <param-value>
       
myserver1:7736:7737|myserver2:7736:7737|myserver:7736:7737
    </param-value>
  </init-param>

  <init-param>
    <param-name>DebugConfigInfo</param-name>
    <param-value>ON</param-value>
  </init-param>

</servlet>

<servlet-mapping>
  <servlet-name>HttpClusterServlet</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>

<servlet-mapping>
  <servlet-name>HttpClusterServlet</servlet-name>
  <url-pattern>*.jsp</url-pattern>
</servlet-mapping>

<servlet-mapping>
  <servlet-name>HttpClusterServlet</servlet-name>
  <url-pattern>*.htm</url-pattern>
</servlet-mapping>

<servlet-mapping>
  <servlet-name>HttpClusterServlet</servlet-name>
  <url-pattern>*.html</url-pattern>
</servlet-mapping>

</web-app>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值