<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
	<!--HttpClusterServlet来拦截请求,然后转发给被代理的服务器  -->
	<servlet>
		<servlet-name>HttpClusterServlet</servlet-name>
		<servlet-class>weblogic.servlet.proxy.HttpClusterServlet</servlet-class>
		<!-- 配置了集群的服务器, 服务器与服务器之间用 |隔开 -->
		<init-param>
			<param-name>WebLogicCluster</param-name>
			<param-value>127.0.0.1:8001|127.0.0.1:8002</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>*.jspf</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>

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐