How can I customize the error messages displayed in the user interface of Service Catalog?
search cancel

How can I customize the error messages displayed in the user interface of Service Catalog?

book

Article ID: 10568

calendar_today

Updated On:

Products

CA Service Catalog CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

Sometimes you may like to customize the user interface, to make the generic messages for the attachment file size error more relevant to their site, for example. This document provides information on how to accomplish this.



Environment

CA Service Catalog 17.x

Resolution

Default text displayed to the users in the UI is stored in the XML files found under the folder structure

USM_HOME\view\webapps\usm\locale\<locale_id>

Where <locale_id> is the language requested by the browser - icusen for English, icsesv for Swedish, etc. If you're making changes for more than one language, you'll want to ensure all those that you handle for are updated.

Next, you'll want to find the file that contains the string you're interested in changing - for our example of an attachment error, it's "error.xml" so we'll open that. In it, the relevant lines for file size problems are:

    <error_filesize1>The uploading file size of </error_filesize1>
    <error_filesize2> exceeds limit of </error_filesize2>
    <error_filesize3>. Please reconfig the size in the config.properties.</error_filesize3>   

As you can see, it's split into three parts, where the actual values of the file size and the limit would be inserted by the application.

However, it is generally considered poor practice to edit this file directly. If you do, it's both hard to track which files you've customized, and you run the risk of losing those changes if they get overwritten during the application of a patch. Instead, copy the file to the equivalent folder in your File Store. This location will vary from installation to installation, as it is common practice to move it to a common server if you have multiple View servers configured, for example. You'll find the correct root set in the user interface, at

Administration > Configuration > File Store Information > File Store Location

Once you have that root, you'd copy this example file from

USM_HOME\view\webapps\usm\locale\icusen\error.xml

to the filestore in

filestore\custom\locale\icusen\error.xml

Once it is there, you'll be able to change the text to the custom message you need.

Additional Information