Custom HTTP 404 web page for the base Service Desk tomcat process when using Apache Tomcat in the configuration
search cancel

Custom HTTP 404 web page for the base Service Desk tomcat process when using Apache Tomcat in the configuration

book

Article ID: 56386

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

How to use a customized HTTP 404 web page for the base Service Desk tomcat process when using Apache Tomcat in the configuration

Environment

Release:  All releases of SDM at and since release 11.x

Resolution

If you may want to use a customized HTTP 404 web page for the base Service Desk tomcat process when using Apache Tomcat in the configuration, here are some suggested steps:

  1. On the Service Desk server machine running on Windows, navigate to the following directory:

    $NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd

    where $NX_ROOT is your base CA Service Desk Manager directory, for example, "C:\Program Files (x86)\CA\Service Desk Manager"

    Note: If you are using the Windows Command Prompt, you could run the following command to set the current directory to the above directory:

    nxcd bopcfg\www\CATALINA_BASE\webapps\CAisd
     
  2. In that directory, create a file, with a file type of jsp and a name of your own choosing, for example, error404.jsp.
     
  3. In the file, include the html for the content of your page, and save the file. For example, error404.jsp may could contain the following lines:
    <%@ page isErrorPage="true" %>
    <h1>A 404 error has occurred</h1>
    The page specified by the URL does not exist. Please contact the Web Application Support team.
     
  4. Navigate to the following directory:

    $NX_ROOT\bopcfg\www\CATALINA_BASE\conf
     
  5. In the directory from the previous step, edit the existing web.xml file, add the following lines before the final "</web-app>" statement, and then save the file:
        <error-page>
         <error-code>404</error-code>
         <location>/error404.jsp</location>
        </error-page>
     
  6. Stop the base Service Desk tomcat by running the following command:
    pdm_tomcat_nxd -c STOP
     
  7. Confirm that tomcat is stopped by running the following command:
    pdm_tomcat_nxd -c STATUS
     
  8. If tomcat is stopped, start is up again, but running the following command:
    pdm_tomcat_nxd -c START
     
  9. Test the above changes by entering a URL reference to a resource under CAisd that does not exist.  Confirm that your content from step#3 is displayed.