< Previous | Next >

Lesson 3.1: Define a web application to run in the Liberty profile

[Version 8.5 and later] Define the web feature to your server definition to enable application functions, such as session replication.

Deprecated feature The web feature is deprecated. Use the webApp feature when you want to replicate HTTP session data for fault tolerance.

The web feature has meta type properties that you can set on the xsWebAppV85 element of the server.xml file. For more information, see Liberty profile web feature properties

Add the following web feature to the Liberty profile server.xml file. The web feature includes the client feature; however, it does not include the server feature. You likely want to separate your web applications from the data grids. For example, you have one Liberty profile server for your web applications and a different Liberty profile server for hosting the data grid.

[Version 8.5 and later]
<featureManager>
<feature>eXtremeScale.web-1.0</feature>
</featureManager>
Your web applications can now persist its session data in a WebSphere® eXtreme Scale grid.
See the following example of a server.xml file, which contains the web feature that you use when you connect to the data grid remotely.

[Version 8.5 and later]
<server description="Airport Entry eXtremeScale Getting Started Client Web Server">
<!-- 
 This sample program is provided AS IS and may be used, executed, copied and modified
 without royalty payment by customer
 (a) for its own instruction and study,
 (b) in order to develop applications designed to run with an IBM WebSphere product,
 either for customer's own internal use or for redistribution by customer, as part of such an
 application, in customer's own products.
 Licensed Materials - Property of IBM
 5724-X67, 5655-V66 (C) COPYRIGHT International Business Machines Corp. 2012
-->
    <!-- Enable features -->
    <featureManager>
        <feature>servlet-3.0</feature>
        <feature>jsp-2.2</feature>
        <feature>eXtremeScale.web-1.1</feature>
    </featureManager>

    <httpEndpoint id="defaultHttpEndpoint"
        host="*"
        httpPort="${default.http.port}"
        httpsPort="${default.https.port}" />

     <xsWebAppV85 objectGridType="REMOTE" objectGridName="session" catalogHostPort="remoteHost:2809" securityEnabled="false" /> 
  
</server>
< Previous | Next >