How to customize TIBCO Administrator error page?

How to customize TIBCO Administrator error page?

book

Article ID: KB0070179

calendar_today

Updated On:

Products Versions
TIBCO Administrator 5.x.x

Description

Sometimes users might want to hide those information shown in tomcat error page. This can be done by customize tomcat configuration.       

Issue/Introduction

How to customize TIBCO Administrator error page?

Environment

OS: All

Resolution

TIBCO Administrator 5.11.3, 5.12.0 and higher version use tomcat 9. The error page in tomcat 9 is handled by the ErrorReportValve which can be configured in file %TIBCO_HOME%/administrator/domain/domainname/tomcat/conf/server.xml. You may enable the valve like below and create your own error pages like "%catalina.base%/myerror/error400.html".
(You may find the %catalina.base% in the Admin .tra file).
For example:
<Valve className="org.apache.catalina.valves.ErrorReportValve" errorCode.400="myerror/error400.html"
  errorCode.404="myerror/error404.html"
  errorCode.0="myerror/errorOthers.html"
  showReport="false" showServerInfo="false"/>

User-added image

For TIBCO Administrator 5.11.2 and lower versions which use tomcat 7, please edit $TIBCO_HOME/administrator/domain/domainname/tomcat/conf/web.xml and add the following configuration just before </web-app>

        <error-page>
            <error-code>404</error-code>
            <location>/error/404.html</location>
        </error-page>

Then create your own error page 404.html under $TIBCO_HOME/Administrator/5.x/tomcat/webapps/ROOT/error/
Similar users can create their own error page for other HTTP error. 

Additional Information

https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Error_Report_Valve