Removing the default Tomcat error page for Service Desk Manager (SDM)
search cancel

Removing the default Tomcat error page for Service Desk Manager (SDM)

book

Article ID: 131638

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

Is it possible to remove the default Tomcat error page for Service Desk Manager (SDM)?

Environment

CA Service Desk Manager 17.1 and higher

All Supported Operating Systems

Cause

Tomcat's default 404 error page has a minor security concern. 

In a web browser, try accessing the SDM UI.  For example http://<SD server hostname>:<port#>/abc

Note: Instead of the correct SDM URL, http://<SD server hostname>:<port#>/CAisd/pdmweb.exe, a wrong URL was used to generate the Tomcat 404 error.  

Resolution

The default Tomcat error page exposes the Tomcat version that SDM is using.

Perform the following to remove the default Tomcat error page:

1.  On the SDM server, make a backup copy of the NX_ROOT\bopcfg\www\CATALINA_BASE folder

2.  Copy  the NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\html  TO  NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\ROOT folder

3.  Go to NX_ROOT\bopcfg\www\CATALINA_BASE\conf folder,  edit the SERVER.XML file with a text editor and add the following entry at the end of the file before the </Host> line:

<Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false"/>

4.  Save the file

5.  Go to NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\ROOT\WEB-INF folder, edit the WEB.XML file with a text editor and add the below four (4) lines BEFORE the line containing </web-app> 

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

6.  Save the file

7.  Go to  NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\WEB-INF folder, edit the WEB.XML file with a text editor and add the below four (4) lines BEFORE the line containing </web-app> 

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

8.  Save the file

9.  Restart the SDM service 

After the above changes, when the SDM URL is accessed via http://<SD server hostname>:<port#>/abc, a screen similar to the following will appear that does not have the Tomcat version listed.