How to customize 403 404 Error pages in SearchBlox?

The steps to customize error page in SearchBlox is as below:

1.) Place the custom page named as 404.html page under /opt/searchblox/webapps/searchblox/
If required you mayneed to add the GTM code in the html page based on your requirement.

2.) Stop SearchBlox Server and edit the file /opt/searchblox/webapps/searchblox/WEB-INF/web.xml to add the following lines right <error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/admin/errorpage.jsp</location>
</error-page>

Here are the custom entries to add for the custom 404 and 403 error codes.

<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>

This tells the web server to serve up the custom page 404.html instead of the standard output for 404 and 403 errors.

3.) Please start SearchBlox and test the custom 404 page.

Please note that there is only one custom HTML page that can be output. We cannot add multiple 404 pages.

Reference for Jetty Web Server custom error pages:  https://www.eclipse.org/jetty/documentation/9.4.x/custom-error-pages.html

 

Have more questions? Submit a request

Comments