Configure the Product

This section tells you how to configure
Web Viewer
.
comwv14
This section tells you how to configure
Web Viewer
.
2
2
The CAWVHOME Environment Variable
During the installation, a CAWVHOME directory is created in the Web Viewer USS installation directory.
Web Viewer
uses the CAWVHOME environment variable to identify the fully qualified path of the CAWVHOME directory. The CAWVHOME variable is defined to your web application server during product deployment. If the CAWVHOME environment variable is not set then Web Viewer checks the following path:
{user.dir}/CAWVHOME
{user.dir}
Defines the current working directory when the
Web Viewer
application starts.
Configuration Parameter File (ConfigFile.cfg)
Web Viewer
reads the configuration from the configuration parameter file. A sample ConfigFile.cfg is provided in the CAWVHOME/config directory. When
Web Viewer
starts, the parameters are loaded from the following CFG file:
$CAWVHOME/config/<
contextpath
>.cfg
$CAWVHOME
The fully qualified path of the
Web Viewer
CAWVHOME directory defined by the CAWVHOME environment variable.
contextpath
The name of the deployed application file, without the .war or .ear extension.
Default:
web-viewer
If the <
contextpath
>.cfg file does not exist, the parameters load from the following file:
$CAWVHOME/config/ConfigFile.cfg
If neither file exists, internal default values are used.
If you transfer this file from distributed to USS, it must be transferred as a binary file.
Each time you update the configuration file, restart the web application server on which
Web Viewer
is deployed.
Configure the Database
You configure the database through the ConfigFile.cfg file.
Follow these steps:
  1. Locate the database parameters section of the file.
  2. Specify the JDBC connection URL for the database. The URL depends on whether you use Db2 or H2.
    • If you use Db2, the format of the JDBC connection URL is: DB_JDBC_URL = "jdbc:db2://<host>:<port>/<database-name><options>";
      • <host>:<port>
        defines the host and port name for Db2.
      • <database-name>
        defines the name of the database.
      • <options>
        defines any database specific options required on the connection URL
      Example:
      DB_JDBC_URL = "jdbc:db2://localhost:50000/DBNAME:retrieveMessagesFromServerOnGetMessage=true;";
      For more information about the URL format for Db2, see the IBM Knowledge Center.
    • If you use H2, the format of the JDBC connection URL depends on if the database is an external database or an internal (embedded) database.
      External:
      DB_JDBC_URL = "jdbc:h2:tcp://<host>:<port>/<fully-qualified-uss-path>/<database-name>";
      Internal:
      DB_JDBC_URL = "jdbc:h2:<fully-qualified-uss-path>/<database-name>";
      • <host>:<port>
        defines the host and port name of the H2 server.
      • <fully-qualified-uss-path>
        defines the fully qualified USS directory for the database.
      • <database-name>
        defines the name of the database.
      The database consists of multiple files starting with <database-name> so the started task user must have write authority to <fully-qualified-uss-path>.
      Examples:
      External: DB_JDBC_URL = "jdbc:h2:tcp://localhost:9092//fully/qualified/uss/path/databasename"; Internal: DB_JDBC_URL = "jdbc:h2:/fully/qualified/uss/path/databasename";
      For more information about the URL format for H2, see Database URL Overview.
  3. Specify the database userid and password.
    For the application to prepare the database schema automatically during startup, the user that connects to the database must have privileges to create and alter database schema objects. Alternatively you can use the provided DDL to create the database schema manually.
    Examples:
    DBUSER = "<userid>";
    DBPASSWORD = "<......>";
  4. (Optional) If you created your own database tables and renamed the schema or table names during the install, configure the following database parameters:
    • Customization of the scheme name is supported for both H2 and DB2.
    • Customization of table names is supported only for H2.
    • Specify the name of the Repository table.
      Example:
      REPOSITORYTABLE = "REPOSITORIES";
    • Specify the owning schema for the WebViewer tables.
      Example:
      SCHEMANAME = "CV_MASTER";
    • Specify the name of the Statistics table.
      Example:
      STATSTABLE = "STATS";
    • Specify the name of the View User table.
      Example:
      VUSERTABLE = "VIEW_USER";
    • Specify the name of the Active Reports table.
      Example:
      REPORTSTABLE = "ACTIVE_REPORTS";
    • Specify the name of the Recalled Reports table.
      Example:
      RECALLTABLE = "RECALLED_REPORTS";
    • Specify the name of the Repository Groups table.
      Example:
      REPOGROUPTABLE = "REPOSITORY_GROUPS";
      The REPOGROUPXREFTABLE is automatically set to the value of REPOGROUPTABLE
      plus
      the suffix "_XREF".  This value cannot be changed.
    • Specify the name of the Export Rules table.
      Example:
      EXPORTRULESTABLE = "EXPORT_RULES";
  5. Save the ConfigFile.cfg file.
  6. Restart the server on which the
    Web Viewer
    WAR file is deployed.
Set the Default Repository Group and Specify Translation for Security Resources
You can optionally use the DEFAULTGROUPNAME parameter to specify the default repository group. If repository groups exist, users can select one from the group drop-down list when they log in to
Web Viewer
.
If the user does not select a group from this list, the user is assigned to the default repository group that you specify with the DEFAULTGROUPNAME parameter. This assignment lasts for the entire session, until the user logs out of
Web Viewer
.
Example:
DEFAULTGROUPNAME  = "BANK-TELLER-25"
SECTRAN
As a security resource, a repository group name might require character translation before being passed to security products (such as CA Top Secret, CA ACF2, or IBM RACF) for authorization.
Use the initialization parameter SECTRAN to specify which characters in the group name are to be translated before the group name is passed to the security product for authorization.
You specify your preference for SECTRAN as
SECTRAN=true
or
SECTRAN=false
.
The following table shows the translation for each character when you specify
SECTRAN=true
:
Character
Translation
& (ampersand)
! (exclamation)
* (asterisk)
+ (plus)
% (percent)
| (bar)
‘ ‘ (blank )
_ (underscore)
¢ (cent sign)
_ (underscore)
! (exclamation point)
_ (underscore)
/ (slash)
_ (underscore)
< (less than)
_ (underscore)
( (left parentheses)
_ (underscore)
| (bar)
_ (underscore)
) (right parentheses)
_ (underscore)
; (semicolon)
_ (underscore)
¬ (not sign)
_ (underscore)
¦ (broken bar)
_ (underscore)
, (comma)
_ (underscore)
> (greater than)
_ (underscore)
? (question mark)
_ (underscore)
: (colon)
_ (underscore)
‘ (single quote)
_ (underscore)
= (equal sign)
_ (underscore)
" (double quote)
_ (underscore)
More information:
  • For more information about SECTRAN, see
    External Security
    in the CA View documentation.
  • For more about repository groups, see Manage Your Repository Groups.
  • For more about how the presence or absence of repository a group (including a default group) affects the user logon experience, see Using.
  • For more about how to manage security resources, including repository groups,see
    Security Requirements
    in the CA View documentation.
Configure Report Metadata Translation
You can specify whether to translate metadata based on the repository charset.
For metadata, you can only translate the User Field and Description fields.
Follow these steps:
  1. Locate the
    TRANSLATEMETADATA
    variable in the file
    ConfigFile.cfg
    .
  2. Configure
    TRANSLATEMETADATA
    with one of the following options:
    • To translate the metadata, specify “True” or "Yes”.
      Example:
      TRANSLATEMETADATA=”True”;
    • To not translate metadata, specify “False” or "No”.
      Example:
      TRANSLATEMETADATA=”False”;
    The default is "False".
  3. Save
    ConfigFile.cfg
    .
  4. If you edit this value while the web application runs, stop and restart the web application.
  5. Restart the server on which the
    Web Viewer
    WAR file is deployed.
Configure
Web Viewer
To Use The Java Transformers
The
TRANSFORM2PDF
variable in the file
ConfigFile.cfg
enables or disables the Java transformers. When you enable the Java transformers, the Java transformers will transform AFP and/or Metacode reports to PDF. The Java transformer configuration parameters define the transformation.
To learn how to configure the Java transformers, see Customizing Java Transformers in the documentation for CA Spool.
A sample Java transformer configuration parameter file is provided in member
&CAI.CVDEOPTN(CAHVX2YP)
.
You install the Java transformers when you install CA View. If you have not installed the Java transformers, see
Install the Java Transformers
in the CA View documentation for instructions.
How to Enable or Disable The Java Transformers
Follow these steps:
  1. Locate the
    TRANSFORM2PDF
    variable in the file
    ConfigFile.cfg
    .
  2. Configure
    TRANSFORM2PDF
    with one of the following options:
    • To enable the Java transformers, specify  "True" or "Yes".
      Example:
      TRANSFORM2PDF=”True”;
    • To disable the Java transformers, specify “False” or "No".
      Example:
      TRANSFORM2PDF=”False”;
    • Default is True
    • You can specify the TRANSFORM2PDF variable as TRANSFORMAFP2PDF.
  3. Save
    ConfigFile.cfg
    .
  4. Verify the
    Web Viewer
    server job includes the
    STDENVX DD
    statement for the Java transformer configuration parameter file.
  5. Restart the
    Web Viewer
    server.
Configure The File Format For Exported Text Reports
You can configure the Export report action to use the following formats:
  • Office Open XML (OOXML)
    Provides greater compatibility and ease of use. OOXML is the default format for exported reports. OOXML filenames appear as
    <filename>.xlsx
    .
  • Microsoft Office XML (XML)
    Consumes fewer resources. XML filenames appear as
    <filename>.xml
    .
Follow these steps:
  1. Locate the
    EXPORT_FORMAT
    variable in the file
    ConfigFile.cfg
    .
    If
    ConfigFile.cfg
    does not include the
    EXPORT_FORMAT
    variable, you can add it and continue this procedure.
  2. Specify
    EXPORT_FORMAT
    with one of the following options:
    • To use Office Open XML, specify "OOXML".
      Example:
      EXPORT_FORMAT = ”OOXML”;
    • To use Microsoft Office XML, specify "XML".
      Example:
      EXPORT_FORMAT = ”XML”;
  3. Save
    ConfigFile.cfg
    .
  4. Restart
    Web Viewer
    server.
    You have configured the file format for exported text reports.
Run the CAHVCFUP Job to Update the Configuration File
You can optionally run the CAHVCFUP job in the &CAI.CVDEJCL PDS to update the configuration file (ConfigFile.cfg) to the current installation level. The job makes the following updates:
  • Backs up the current configuration file.
  • Add new parameters if necessary.
    If you have installed any release, increment, or PTF that includes new configuration file parameters, the job adds the new parameters using default values.
    The job does
    not
    change the values of any existing parameters.
  • Converts the DBTYPE and DBLOCATION parameters to the new DB_JDBC_URL parameter.
  • Removes the DBNAME parameter and the associated comment. The DBNAME parameter is not yet used; it is reserved for future use.
Meet these prerequisites before you run CAHVCFUP:
  • Verify that the user running this job has update access to the configuration file and can create the backup configuration file.
  • Replace the JOB card with a valid JOB card for your site.
  • Change the following parameter values to your installation values:
    • <JAVA_HOME>
      specifies the name of your JAVA home directory.
    • <CV_INSTALL>
      specifies the name of your
      Web Viewer
      home directory.
    • <TEMP_PATH>
      Specifies the name of the existing temp directory in USS. This path must exist because the utility does not create this path.
    • <CONFIG_PATH>
      Specifies the path (directory) to your configuration file.
    • <CONFIG_FILE>
      Specifies the file name of your configuration file.
    • <BACKUP_PATH>
      Specifies the path (directory) to your backup configuration file.
    • <BACKUP FILE>
      Specifies the file name of your backup configuration file.
After you run CAHVCFUP, review the updated configuration file.
Configuring Logging
To configure logging for the product, you update the logging configuration file, and then set the logging level in ConfigFile.cfg.
Follow these steps:
  1. By default, the product loads this logging configuration file:
    $CAWVHOME/config/<
    contextpath
    >_log4j2.xml
    If the product does not find this file, it searches for log4j2.xml in the same location. If the product does not find either file, we provide the following default logging configuration file in the deployed application:
    $CATALINA_HOME/webapps/<
    contextpath
    >/WEB-INF/classes/config
    Update this XML file as appropriate for your environment. By default, this file logs messages to the STDOUT DD and to the following rolling file:
    $CAWVHOME/logs/<
    contextpath
    >.log
    Each day, the rolling file is renamed to include the date.
    By default, log records are formatted as follows:
    <date> <log level> <
    userid
    > <
    sessionid
    > <message>
    <date> - The date and time of the message.<log level> - The log level of the message.<
    userid
    > - The id of the user who generated this message.<
    sessionid
    > - The session number of the user who generated this message.<message> - The text of the message..
  2. Open ConfigFile.cfg.
  3. Locate the LOGLEVEL= line and specify the appropriate logging level: (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE or ALL).
    Default:
    LOGLEVEL = "INFO";
  4. Save the ConfigFile.cfg file.
  5. Restart the server on which the
    Web Viewer
    WAR file is deployed.
How Log4j Logging Levels Work
Log4j provides a logging level hierarchy. For example, the Trace level shows all messages from the Trace level through the Fatal level. The Debug level shows Info, Warn, Error, and Fatal levels. If you specify All, you get all levels, such as with Fatal.
Logging Level Hierarchy
Logging Level Hierarchy
Fatal
Logs server errors that prevent the application from running. This level only includes Fatal messages.
Error
Logs errors that might let you recover. This level also includes Fatal messages.
Warn
Logs events that might lead to an error. This level also includes Error and Fatal messages.
Info
Logs events for informational purposes. This level also includes Warn, Error, and Fatal messages.
Debug
Logs general debugging events. This level also includes Info, Warn, Error, and Fatal messages.
Trace
Logs all messages that capture the typical flow through the application. This level includes Debug, Info, Warn, Error, and Fatal messages.
All
Logs all messages (same as Trace).
Off
Does not log any messages.
For more information about the Log4j architecture, see the official Apache Log4j Documentation.