Configuring a software load balancer
Although WebLogic Server is an application server used mostly for dynamic content and Java EE applications, it is also a fully-featured web server that's capable of serving static files as HTML and images. A WebLogic instance can even be used as a load balancer to distribute requests between clustered servers and do the necessary failover routing when a server becomes unavailable. In order to leverage such built-in functionalities, you must set up weblogic.servlet.proxy.HttpClusterServlet
to act as your default web application for the domain. Here are the steps:
Create a new dynamic web application in Eclipse named
HttpClusterServlet
.Open or create a
web.xml
deployment descriptor under theWEB-INF
folder.Copy and paste the following content inside
web.xml
:... <servlet> <servlet-name>HttpClusterServlet</servlet-name> <servlet-class> weblogic.servlet.proxy.HttpClusterServlet </servlet-class> <init-param> ...