SearchBlox

SearchBlox Developer Documentation

Welcome to the SearchBlox developer documentation. Here you will find comprehensive technical documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

Customize 404 Error Page

Steps to Customize Error Page in SearchBlox

  1. Place a custom HTML page named as 404.html page under paths
    <SEARCHBLOX_INSTALLATION_PATH>/webapps/ROOT/
    <SEARCHBLOX_INSTALLATION_PATH>/searchblox/webapps/searchblox/

  2. Stop SearchBlox Server

  3. Edit below files:
    <SEARCHBLOX_INSTALLATION_PATH>/etc/webdefault.xml
    <SEARCHBLOX_INSTALLATION_PATH>/webapps/searchblox/WEB-INF/web.xml

  4. Give the following custom entries to add for the custom 404 and 403 error codes. This tells the webserver to serve up the custom page 404.html instead of the standard output for 404 and 403 errors.

Sample code snippet from webdefault.xml

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

Sample code snippet from web.xml

<error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/admin/errorpage.jsp</location>
    </error-page>
<error-page>
  <error-code>404</error-code>
  <location>/404.html</location>
</error-page>
<error-page>
  <error-code>403</error-code>
  <location>/404.html</location>
</error-page>
    <security-constraint>
        <web-resource-collection>
  1. Please start SearchBlox and test the custom 404 page by giving an incorrect URL as SearchBlox endpoint.
    Please note that there is only one custom HTML page that can be used as a 404 error page.

Updated about a year ago


What's Next

You can go through the related sections below

Overview

Customize 404 Error Page


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.