Technical data

Setting Up the HttpClusterServlet
Administration Guide 10-3
3. Create the web.xml deployment descriptor file for the servlet, under the
WEB-INF directory of the Web application. Use any text editor. Sample
deployment descriptors for the new and deprecated versions of the proxy servlet
are provided in “Sample Deployment Descriptors” on page 10-4. For
comprehensive instructions on writing a
web.xml file, see “Writing Web
Application Deployment Descriptors” in Assembling and Configuring Web
Applications.
a. Define the name and class for the servlet in the
<servlet> element in
web.xml. The servlet name is HttpClusterServlet for both versions of the
servlet.
The new servlet class is
weblogic.servlet.proxy.HttpClusterServlet.The deprecated servlet
class is
weblogic.servlet.internal.HttpClusterServlet.
b. Identify the clustered server instances to which the proxy servlet will direct
requests in the
<servlet> element in web.xml.
If you are using the new version of
HttpClusterServlet, define the
WebLogicCluster parameter.
If you are using the deprecated version of
HttpClusterServlet, define the
serverlist parameter.
c. Create
<servlet-mapping> stanzas to specify the 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. Defining 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
“web.xml for HttpClusterServlet SP02” on page 10-5.
d. Define, as appropriate, any additional parameters as described in “Parameters
for Web Server Plug-ins” in Using WebLogic Server with Plug-ins. Follow the
syntax instructions in “Syntax” on page 10-7. See also “Cluster Configuration
and Proxy Plug-ins” on page 10-13.
e. Define, as appropriate, cluster configuration parameters that affect the behavior
of
HttpClusterServlet. For more information, see “Cluster Configuration
and Proxy Plug-ins” on page 10-13.