Sample web.xml This section contains a sample deployment descriptor file

10-12 Using Clusters for Oracle WebLogic Server – KeyStoreType—The key store type. If it is not defined, the default type will be used instead. – PrivateKeyAlias—The private key alias. – KeyStorePasswordProperties—A property file in your Web application that defines encrypted passwords to access the key store and private key alias. The file contents looks like this: KeyStorePassword={AES}yWvi0qhfM4IvzoghzjHjxpJUkQPF8OWuSfh0f0Ss= PrivateKeyPassword={AES}wr86u9Z5DHr+5p7WIbzTDSy4Msl7EYnXK5xzcarDQ= You must use the weblogic.security.Encrypt command-line utility to encrypt the password. For more information on the Encrypt utility, as well as the CertGen, and der2pem utilities, see Using the Oracle WebLogic Server Java Utilities in the Command Reference for Oracle WebLogic Server. d. Create servlet-mapping stanzas to specify the requests that the servlet will proxy to the cluster, using the url-pattern element to identify specific file extensions, for example .jsp, or .html. Define each pattern in a separate servlet-mapping stanza. You can set the url-pattern to to proxy any request that cannot be resolved by WebLogic Server to the remote server instance. If you do so, you must also specifically map the following extensions: .jsp, .html, and .html, to proxy files ending with those extensions. For an example, see Section 10.2.9.1.1, Sample web.xml. e. Define, as appropriate, any additional parameters. See Table 10–1 for a list of key parameters. See Parameters for Web Server Plug-ins in Using Web Server Plug-Ins with WebLogic Server for a complete list. Follow the syntax instructions in Section 10.2.9.1.3, Proxy Servlet Deployment Parameters. 3. Create the weblogic.xml deployment descriptor file for the servlet. This file must reside in the \WEB-INF subdirectory of the Web application directory. Assign the proxy servlet as the default Web application for the Managed Server on the proxy machine by setting the context-root element to a forward slash character in the weblogic-web-app stanza. For an example, see Section 10.2.9.1.2, Sample weblogic.xml. 4. In the Administration Console, deploy the servlet to the Managed Server on your proxy server machine. For instructions, see Deploy applications and modules in Oracle WebLogic Server Administration Console Help.

10.2.9.1.1 Sample web.xml This section contains a sample deployment descriptor file

web.xml for HttpClusterServlet. web.xml defines parameters that specify the location and behavior of the proxy servlet: both versions of the servlet: ■ The DOCTYPE stanza specifies the DTD used by WebLogic Server to validate web.xml. ■ The servlet stanza: – Specifies the location of the proxy plug-in servlet class. The file is located in the weblogic.jar in your WL_HOMEserverlib directory. You do not have to specify the servlets full directory path in web.xml because weblogic.jar is put in your CLASSPATH when you start WebLogic Server. Setting up WebLogic Clusters 10-13 – Identifies the host name either DNS name or IP address and listen port of each Managed Servers in the cluster, using the WebLogicCluster parameter. – Identifies the key store initialization parameters to use two-way SSL with your own identity certificate and key. ■ The three servlet-mapping stanzas specify that the servlet will proxy URLs that end in , htm, html, or jsp to the cluster. For parameter definitions see Section 10.2.9.1.3, Proxy Servlet Deployment Parameters. DOCTYPE web-app PUBLIC -Sun Microsystems, Inc.DTD Web Application 2.3EN http:java.sun.comdtdweb-app_2_3.dtd; web-app servlet servlet-nameHttpClusterServletservlet-name servlet-class weblogic.servlet.proxy.HttpClusterServlet servlet-class init-param param-nameWebLogicClusterparam-name param-valuehostname1:7736|hostname2:7736|hostname:7736param-value init-param init-param param-nameKeyStoreparam-name param-valuemykeystoreparam-value init-param init-param param-nameKeyStoreTypeparam-name param-valuejksparam-value init-param init-param param-namePrivateKeyAliasparam-name param-valuepassaliasparam-value init-param init-param param-nameKeyStorePasswordPropertiesparam-name param-valuemykeystore.propertiesparam-value init-param servlet servlet-mapping servlet-nameHttpClusterServletservlet-name url-patternurl-pattern servlet-mapping servlet-mapping servlet-nameHttpClusterServletservlet-name url-pattern.jspurl-pattern servlet-mapping servlet-mapping servlet-nameHttpClusterServletservlet-name url-pattern.htmurl-pattern servlet-mapping servlet-mapping servlet-nameHttpClusterServletservlet-name url-pattern.htmlurl-pattern servlet-mapping web-app 10-14 Using Clusters for Oracle WebLogic Server

10.2.9.1.2 Sample weblogic.xml This section contains a sample weblogic.xml file. The