Sun Java System Portal Server 7.1 Configuration Guide

ProcedureTo Install Proxy Servlet for Load Balancing

This procedure creates a proxy server .war file for load balancing.

  1. Telnet to Node 1.

  2. Create files web.xml and weblogic.xml in the new proxy/WEB-INF directory.


    mkdir -p proxy/WEB-INF
    cd proxy/WEB-INF
  3. Add the following contents to the web.xml file.


    <!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>
    
    <servlet>
            <servlet-name>HttpClusterServlet</servlet-name>
            <servlet-class>weblogic.servlet.proxy.HttpClusterServlet</servlet-class>
            <init-param>
                    <param-name>WebLogicCluster</param-name>
                    <param-value>HOST.DOMAIN:7011|HOST.DOMAIN:7022</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>
  4. Add the following contents to the weblogic.xml file.


    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems,
     Inc.//DTD Web Application 8.1//
    EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
            <context-root>/</context-root>
    </weblogic-web-app>
  5. Change directories to the proxy directory.

  6. Run the following command:

    /usr/jdk/jdk1.5.0_01/bin/jar cvf proxy.war WEB-INF

  7. Access the administrator console.

    http://node1.domain-name:7001/console

  8. Click Server > Configure a New Server.

  9. Enter the new server name as proxy and the listen port as 55555, and click Apply.

  10. Click Deployment in the left pane, click Web Applications Module, and click Deploy New.

  11. Select proxy.war from the node1.domain and deploy it on the independent server named proxy.